1class calc:
2 def __init__(self,num):
3 self.num = num
4 def __add__(self,other):
5 #inner code
6 def __mul__(self, other):
7 #inner code
8 def __sub__(self, other):
9 #inner code
10 def __div__(self,other):
11 #inner code
12 # and so on for features
13
1x = input("first number")
2y = input("second number")
3z = input("do you want to multiply, minus, divide or add? (x,-,/,+)")
4
5y = int(y)
6x = int(x)
7
8if z == "+":
9 print (x + y)
10
11if z == "/":
12 print (x / y)
13
14if z == "x":
15 print (x * y)
16
17if z == "-":
18 print (x - y)
19
20else:
21 print("use x,-,/ or + next time!")