Write a program in python to print respective month of a year.
month = int(input("Enter Month between 1 to 12: "))
if month<=12 :
if month==1 :
print("JANUARY")
elif month==2 :
print("FEBRUARY")
elif month==3 :
print("MARCH")
elif month==4 :
print("APRIL")
elif month==5 :
print("MAY")
elif month==6 :
print("JUNE")
elif month==7 :
print("JULY")
elif month==8 :
print("AUGUST")
elif month==9 :
print("SEPTEMBER")
elif month==10 :
print("OCTOBER")
elif month==11 :
print("NOVEMBER")
elif month==12 :
print("DECEMBER")
else :
print("The month entered does not exist ")
Comments
Leave a comment