Answer to Question #262101 in Python for Gopi

Question #262101

Write a program in python to print respective month of a year.

1
Expert's answer
2021-11-07T01:44:39-0400


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 ")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS