Hello, I’m trying to write a section of a program that converts month names to numbers. My teacher says we have to do it using else and if and elif statements, not with any month functions. The original if statement is running but none of the elif or else statements afterwards are. I’m not getting any errors, they just simply arent running. The indentation is correct, and there arent any extra lines in between or anything, just not sure why my elifs arent running. Also, even for the original if statement, when I put a print test there to see if it was working, it seemed to print it no matter what the input was. How do I ensure that it actually recognizes the text and turns it into numbers? Right now it just seems to make A=13 no matter what the input is. Here is the code:
A=input("Please enter the name of the month: ")
if(A=="January" or "january"):
A=13
elif(A=="February" or "february"):
A=14
elif(A=="March" or "march"):
A=3
elif(A=="April" or "april"):
A=4
elif(A=="May" or "may"):
A=5
elif(A=="June" or "june"):
A=6
elif(A=="July" or "july"):
A=7
elif(A=="August" or "august"):
A=8
elif(A=="September" or "september"):
A=9
elif(A=="October" or "october"):
A=10
elif(A=="November" or "november"):
A=11
elif(A=="December" or "december"):
A=12
else:
print("incorrect input. Please try again")