Aim: Simple desktop calculator using Python. Only the five basic arithmetic operators.
Algorithm:
Step 1: Start.
Step2: Display the menu of operations: 1. Add 2. Subtract 3. Multiply 4. Divide 5. Exit
Step 3: Input the user’s choice of operation. If the choice is 5: Exit the program.
Step 4: If the choice is between 1 and 4: Input the first number. Input the second number.
Step 5: If the choice is 1: Calculate the result: result=first number+second number
Step 6: Else If the choice is 2: Calculate the result: result= first number/second number Else Display “Error! Division by zero.”
Step 7: Display the result.
Step 8: Repeat from step 2.
Step 9: End
Credits: Safeonnet by Edwhere Learning