Skip to content

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

Notifications You must be signed in to change notification settings

Bishwa-cyber/SimpleCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages