-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (26 loc) · 859 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (26 loc) · 859 Bytes
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
command = str(input(">>>"))
if command == "add":
num1 = int(input("Enter first number: - "))
num2 = int(input("Enter second number: - "))
sum = num1 + num2
print("Your sum: - ", end=" ")
print(sum)
if command == "subtract":
num1 = int(input("Enter first number: - "))
num2 = int(input("Enter second number: - "))
difference = num1 - num2
print("Your difference: - ", end=" ")
print(difference)
if command == "multiply":
num1 = int(input("Enter first number: - "))
num2 = int(input("Enter second number: - "))
product = num1 * num2
print("Your product: - ", end=" ")
print(product)
if command == "divide":
num1 = int(input("Enter first number: - "))
num2 = int(input("Enter second number: - "))
quotient = num1 / num2
print("Your quotient: - ", end=" ")
print(quotient)
quit()