PY
py
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
#Except web codes all other codes run remotely on SL server.
#So when we run code, we send the code and input to server, then it executes it and sends us the output.
#So we can only interact once with the server
print("Calculator")
print("Options")
print("Enter 'Add' for addition")
print("Enter 'Minus' for subtracting")
print("Enter 'multiply'for multiply")
print("Enter 'division' for diving")
print("Enter 'quit'for ENDING program")
n = float(input("Enter first number"))
no = float(input("Enter second number"))
#while True:
a = input()
if a == "add":
add = str(n + no)
print ("Your reault is "+ add)
elif a == "Minus":
sub = str(n - no)
print ("Your result is "+ sub)
elif a == "multiply":
product = str(n * no)
print ("Your result is "+ product)
elif a == "division":
quote = str(n/no)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run