From e30dd3c6ea7241fdbc93ede56527e282598d6386 Mon Sep 17 00:00:00 2001 From: GianmarcoBasile Date: Mon, 30 Oct 2023 18:29:44 +0100 Subject: [PATCH] feat: ex2 exercise --- src/ex2.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/ex2.py diff --git a/src/ex2.py b/src/ex2.py new file mode 100644 index 0000000..f0d4264 --- /dev/null +++ b/src/ex2.py @@ -0,0 +1,5 @@ +week = int(input('Enter week number (1-7): ')) + +week_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] + +print(week_days[week - 1] if week in range(1, 8) else 'Invalid week number')