coding utf-8 __author__ Nastya print Calc Ver x1 int raw_input Value x

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#coding=utf-8
__author__ = 'Nastya'
print("Calc. Ver 0.0.2")
x1 = int(raw_input("Value 1: "))
x2 = int(raw_input("Value 2: "))
print("Choose operation:\n*\t/\t+\t-")
operation = raw_input(">> ")
while True:
result = None
if operation == '+':
result = x1 + x2
elif operation == '-':
result = x1 - x2
elif operation == '*':
result = x1 * x2
elif operation == '/':
result = x1 / x2
print "Res:", str(result)