Waiting for the weekend.
Functions are very useful for calling a block of code when certain criteria are met. You can invoke a function instead of repeating that block of code every time you would want it to run. For this assignment, you will incorporate functions to run certain code depending on what day of the week it is.
Your program should include the following:
- If the current day of the week is a school day, use a function to announce that it’s a school day, as well as how many days are left until the weekend.
- If the current day is part of the weekend, use a function to announce that it’s the weekend, as well as how many hours are left in the weekend.
- Use functions to make blocks of codes that will determine the day, how many days left until the weekend, and how many hours for a partial day.
back to index