From 7509f7cb69782508d0c2baf67763334ccabc08ec Mon Sep 17 00:00:00 2001 From: aruvii13 Date: Thu, 31 Jul 2025 11:28:51 +0530 Subject: [PATCH] Update easy_q13.py --- problems/easy/easy_q13.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/problems/easy/easy_q13.py b/problems/easy/easy_q13.py index dd23d02..dcf888b 100644 --- a/problems/easy/easy_q13.py +++ b/problems/easy/easy_q13.py @@ -1,4 +1,3 @@ -# Month Name: Write a program that takes a number (1-12) and prints the corresponding month name using a switch case. def month_name(month): switch = { 1: "January", @@ -14,12 +13,8 @@ def month_name(month): 11: "November", 12: "December" } - - return switch.get(month) + return switch.get(month, "Invalid Month") + if __name__ == "__main__": chooseMonthNum = int(input("Enter the Month from 1 to 12: ")) - - - return switch.get(month, "Invalid Month") - - \ No newline at end of file + print("Month Name:", month_name(chooseMonthNum))