From af3eda7123f961728932d7dc19a5dfafe65f0d86 Mon Sep 17 00:00:00 2001 From: Mahesh Dattatraya Babar <53929423+maheshdbabar9340@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:43:53 +0530 Subject: [PATCH] Added Solution for Calendar Module (HackerRank). --- HackerRank Calendar Module Solution | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 HackerRank Calendar Module Solution diff --git a/HackerRank Calendar Module Solution b/HackerRank Calendar Module Solution new file mode 100644 index 0000000..f96795d --- /dev/null +++ b/HackerRank Calendar Module Solution @@ -0,0 +1,22 @@ +import calendar +#calendar.Calendar(calendar.SUNDAY) +user_input = input().split() +month = int(user_input[0]) +day = int(user_input[1]) +year = int(user_input[2]) +c = calendar.weekday(year, month, day) + +if c == 0: + print("MONDAY") +elif c == 1: + print("TUESDAY") +elif c == 2: + print("WEDNESDAY") +elif c==3: + print("THURSDAY") +elif c==4: + print("FRIDAY") +elif c== 5: + print("SATURDAY") +elif c==6: + print("SUNDAY")