From 7b408049ed6504ac8a851ecc24e122a089621092 Mon Sep 17 00:00:00 2001 From: ABHIJITH UDAYAKUMAR Date: Wed, 17 Feb 2021 00:00:10 +0530 Subject: [PATCH] Commit --- MaytoAugust.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 MaytoAugust.py diff --git a/MaytoAugust.py b/MaytoAugust.py new file mode 100644 index 0000000..3fa8586 --- /dev/null +++ b/MaytoAugust.py @@ -0,0 +1,21 @@ +#Q. 17: + +#May to August(Control Stmt - if-elif-el) + +#The length of a month varies from 30 and 31 days. +#In this exercise you will create a program that reads the name of a month from the user as a string. +#The program should get input from May to August. +#If the input is from may to other months then display error messages as "Invalid" + + +a=str(input()) +if a=="May": + print(31) +elif a=="Jun": + print(30) +elif a=="Jul": + print(31) +elif a=="Aug": + print(30) +else: + print("Invalid") \ No newline at end of file