Write a program to create a menu-driven calculator that performs basic arithmetic operations (+, -, *, /, and %). In python
Answers
Answered by
2
i hope my answer helps you
Attachments:
Answered by
2
Answer:
Explanation:
num1 = int(input("Enter a Number: "))
num2 = int(input("Enter another Number: "))
operator = str(input("Enter the Operation you want: "))
if operator == "+":
print("Result is:" , (num1 + num2))
elif operator == "-":
print("Result is:" , (num1 - num2))
elif operator == "*":
print("Result is:" , (num1 * num2))
elif operator == "/":
print("Result is:" , (num1 / num2))
elif operator == "%":
print("Result is:" , (num1 % num2))
Similar questions