Answer:
Program:
month=['January', 'Februrary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] #list which stores the name of the month.
CheckMonth= int(input("Enter the number of the month")) #it is used to take the inputs from the user.
if CheckMonth>=1 and CheckMonth<=12: #check the condition for valid month.
print(str(CheckMonth)+" is a valid month which name is: "+ str (month [CheckMonth-1])) #print the name of month which is enter by the user.
else:
print(str(CheckMonth)+" is not a valid month, please enter the valid month") # print for the invalid month.
Output:
Explanation: