- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsum.py
More file actions
Latest commit
17 lines (13 loc) · 492 Bytes
/
Copy pathsum.py
File metadata and controls
17 lines (13 loc) · 492 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
numOne=input("Enter first number: ")
numTwo=input("Enter second number: ")
sum=float(numOne) +float(numTwo)
print("The sum is:", sum)
subtraction=float(numOne) -float(numTwo)
print("The subtraction is:", subtraction)
multiplication=float(numOne) *float(numTwo)
print("The multiplication is:", multiplication)
try:
division=float(numOne) /float(numTwo)
print(f"The division is: {division}")
exceptZeroDivisionError:
print("Error: You tried to divide by zero!")