-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconditionals.py
More file actions
31 lines (26 loc) · 878 Bytes
/
Copy pathconditionals.py
File metadata and controls
31 lines (26 loc) · 878 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
30
day_of_week = input("Enter the day of week: ").lower() #convert to lower-case
print(day_of_week)
if day_of_week == "saturday" or day_of_week == "sunday": #true
print("I'll learn devOps")
else: #false
print("I will practice devops")
num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: " ))
choice = input("Enter the operation: (Options + , - , * , / , %) ")
if choice == "+":
sum_of_num = num1 + num2
print("addtion", sum_of_num)
elif choice == "-":
diff_of_num = num1 - num2
print("substraction", diff_of_num)
elif choice == "*":
product_of_num = num1 * num2
print("product", product_of_num)
elif choice == "/":
division_of_num = num1 / num2
print("division", division_of_num)
elif choice == "%":
remainder_of_num = num1 % num2
print("modulus", remainder_of_num)
else:
print("Invalid input")