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
|