calculator

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
running = True
while running:
print("1 = plus")
print("2 = minus")
print("3 = multiply")
print("4 = razdelit")
print("5 = exit")
cmd = int(input("Type number: "))
if cmd == 1:
print("plus")
x = int(input("Enter x:"))
y = int(input("Enter y:"))
print(x + y)
elif cmd == 2:
print("minus")
x = int(input("Enter x:"))
y = int(input("Enter y:"))
print(x - y)
elif cmd == 3:
print("multiply")
x = int(input("enter x:"))
y = int(input("Enter y:"))
print(x * y)
elif cmd == 4:
print("delit")
x = int(input("Enter x:"))
y = int(input("enter y:"))
print "Result is"(x / y)
elif cmd == 5:
print("quit")
running = False