-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodayMsg.py
More file actions
26 lines (20 loc) · 917 Bytes
/
Copy pathtodayMsg.py
File metadata and controls
26 lines (20 loc) · 917 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
#I figured else-if statements existed in Python because of my experience
#with other languages
#Day is takes the input from the user and turns it into a variable to compare
#to the if else loop to determine outcome
#First checks if the input matches the strings Saturday or Sunday
#If it doesn't it then checks for Monday, and if it fails that, it checks for
#the other days
#If it isn't any of the other listed days, then it spits out Sorry and stops
print("Write dayMsg() to start this program")
def dayMsg():
day = input("Day name (Tuesday, Monday, etc.):")
if (day=="Saturday" or day=="Sunday"):
print("Yay! It's the weekend!")
elif (day=="Monday"):
print("Yay! I've got the Mondays!")
elif (day=="Tuesday" or day=="Wednesday" or day=="Thursday" or day=="Friday"):
print("...just a regular day...")
else:
print("Sorry... I don't know that day.")
dayMsg()