Step 1: Weekend or not
The hours depend on the day, so the sign starts with one question: is day a weekend day? Here's
the version almost everyone writes first:
weekend = day == "Saturday" or "Sunday"
Set day = "Monday" and print it: Sunday. Every day is the weekend. or joins two complete
conditions, and the right-hand side here isn't a comparison, it's just the text "Sunday". Python
counts any non-empty text as true, so or hands it back. Each side needs its own comparison:
weekend = day == "Saturday" or day == "Sunday"
In sign.py, keep the answer in weekend and print it:
Weekend: True
The check tries every day of the week.
sign.py, the file you edit6 lines
# The sign on Bean There's door. Weekdays 7:00 to 18:00; Saturday and Sunday 8:00 to 16:00.
day = "Saturday"
hour = 9
# TODO (Step 1): keep whether day is Saturday or Sunday in a variable called weekend, and print it:
# Weekend: True