Question 5: If Else Elif

Simple Calculator Adventure

Write a Python program to help a user perform basic arithmetic calculations.

  1. Start by asking for the user’s name and store it in a variable called name.
  2. Ask the user to enter two numbers, storing them in variables num1 and num2 (as integers or floats).
  3. Provide a menu of arithmetic options:
    • Addition (+)
    • Subtraction (-)
    • Multiplication (*)
    • Division (/)
  4. Based on the user’s choice, perform the selected operation on num1 and num2.
  5. Display the result of the calculation in a friendly sentence, like:
    “Hi [name]! The result of your calculation is [result].”
Write what you are looking for, and press enter to begin your search!