Q1. Create a calculator where user have a menu to perform addition / subtraction / multiplication / division / display tables . Using loops in python. code example
Example 1: calculator in python
Select operation.
1.Add
2.Subtract
3.Multiply
4.Divide
Enter choice(1/2/3/4): 3
Enter first number: 15
Enter second number: 14
15.0 * 14.0 = 210.0
Example 2: python calculator
print("Choose operator (+,-,*,/):")
mode = input()
print("Choose first int:")
x = int(input())
print("Choose second int:")
y = int(input())
print("Your result:")
if mode == "+":
print(x+y)
elif mode == "-":
print(x-y)
elif mode == "*":
print(x*y)
elif mode == "/":
print(x/y)