๐งฎ Basic Calculator in Python: This is a beginner-friendly Python program that performs basic arithmetic operations: addition, subtraction, multiplication, and division. The program prompts the user to enter two numbers and an operation, then displays the result.
๐ Features Takes two numeric inputs from the user
Supports four operations: +, -, *, /
Handles division by zero
Provides clean output in the format:
10.0 + 5.0 = 15.0
๐ How to Run:
Make sure you have Python installed (python3 or above).
Save the program in a file, for example: calculator.py.
Run it using your terminal or IDE:
bash python calculator.py
๐ก Example
Enter the first number: 10
Enter the second number: 5
Enter the operation (+, -, *, /): *
10.0 * 5.0 = 50.0
๐ง Notes Input is taken as float, so it works with both whole numbers and decimals.
If the user attempts division by zero, an error message is displayed.
๐งโ๐ป Author Made Ayorinde Adeyemi. ๐