Calculator App

Simple Calculator

  • Create a command-line calculator where users can input mathematical operations (addition, subtraction, multiplication, division), and the program will compute the result
  • A simple program that performs addition, subtraction, multiplication, and division.

    def calculator(): num1 = float(input("Enter first number: ")) op = input("Enter operator (+, -, *, /): ") num2 = float(input("Enter second number: ")) if op == '+': print("Result:", num1 + num2) elif op == '-': print("Result:", num1 - num2) elif op == '*': print("Result:", num1 * num2) elif op == '/': print("Result:", num1 / num2) else: print("Invalid operator!") calculator()

  1. To-Do List
    • Build a to-do list program where users can add tasks, mark them as complete, and delete them. You can store tasks in a file or in memory.
  2. Basic Alarm Clock
    • Build a simple alarm clock where the user can set a time, and the program will notify them once the time is reached.
  3. Currency Converter
    • Create a currency converter that uses exchange rates from an API (like ExchangeRate-API) to convert one currency to another.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *