Python Program to Make a Simple CalculatorIn Python, we can create a simple calculator for performing the different arithmetical operations, such as addition, subtraction, multiplication, and division. Approach:
Example: Code: for Simple Calculator Output: Case - (1): Please select the operation. a. Add b. Subtract c. Multiply d. Divide Please enter choice (a/ b/ c/ d): d Please enter the first number: 1 Please enter the second number: 2 1 / 2 = 0.5 Case - (2): Please select the operation. a. Add b. Subtract c. Multiply d. Divide Please enter choice (a/ b/ c/ d): b Please enter the first number: 12 Please enter the second number: 11 12 - 11 = 1 Next TopicPython Display Calendar |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India