Write a program in python to print respective month of a year.
print("Enter the month number between 1 to 12 : ")
#this code asks you to choose the number of a current month
month = int(input())
#this is assigning input where you can enter the number of a month
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("Octomber")
elif month==11 :
print("November")
elif month==12 :
print("December")
else :
print("No Such Kind Of Month Exists Please Input Between 1 to 12 ")
#here are conditions to find and to show which month
Comments
Leave a comment