while I am able to use the months of the year in a list I am not allowed to hard code the month number. What I am trying to output is as follows:
1 is equal to the month of January
2 is equal to the month of February
3 is equal to the month of March
etc… through December
Finished correlating month number with Month
here is the program but i am not getting the output that I am expecting. My thinking is that
months_of_the_year = [“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”,
“November”, “December”]
number_of_month = 0
while number_of_month < 12:
number_of_month = number_of_month + 1
for x in months_of_the_year:
print(number_of_month, “is equal to the month of”, + x)
break
print(“Finished correlating month number with Month”)
Thanks for help any suggestions to help me understand what I am doing wrong.