-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (24 loc) · 853 Bytes
/
main.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
print("select an operation to perform: ")
print("1. ADD")
print("2. SUBTRACT")
print("3. MULTIPLY")
print("4. DIVIDE")
operation = input()
if operation == "1":
num1 = input("Enter first number: ")
num2 = input("Enter second number: ")
print("The sum is " + str(int(num1) + int(num2)))
elif operation == "2":
num1 = input("Enter first number: ")
num2 = input("Enter second number: ")
print("The difference is " + str(int(num1) - int(num2)))
elif operation == "3":
num1 = input("Enter first number: ")
num2 = input("Enter second number: ")
print("The product is " +str(int(num1) * int(num2)))
elif operation == "4":
num1 = input("Enter first number: ")
num2 = input("Enter second number: ")
print("The result is " + str(int(num1) / int(num2)))
else:
print("Invalid Entry")