Loading...
Loading...
Loading...
Day 1 is Monday, day 2 is Tuesday and so on up to day 7, which is Sunday.
Given a day number, print its name. For any other number print Invalid day. Use match-case.
Invalid day.Example 1
Input
3
Output
Wednesday
Example 2
Input
9
Output
Invalid day
Try the problem first. Open one hint at a time.
Match the number against the literals 1 to 7, one case each.
Finish with case _: for everything else.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor