Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 824 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 824 Bytes

SimpleCalculator

Calculators work best when a human provides equations for the computer to solve. You’ll start writing your program at the point where the human enters the numbers that they would like the computer to work with. First, you’ll create a file for your program. For this example, we’ll use the text editor nano and name the file Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication, or division depending upon the user input. Approach :

User chooses the desired operation. Options 1, 2, 3, and 4 are valid. Two numbers are taken and an if…elif…else branching is used to execute a particular section. Using functions add(), subtract(), multiply() and divide() evaluate respective operations.

Python program for simple calculator