Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/ex2.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@
#
# return 0;
# }

week = int(input("Enter week number(1-7): "))
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]

if 1 <= week <= 7:
print(days[week - 1])
else:
print("Invalid input! Please enter week number between 1-7.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

puoi fare il wrap del codice in una funzione

quindi crea una funzione che implementi questo codice