Skip to content

Cedar-Creatives/PLP-Python-Assignment-Wk-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ 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. ๐Ÿ˜Š

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages