I'm trying to complete an assignment, but i'm getting stuck. My first if not, elif, else: works for the first month (January). When I try to write the code for the next month (February) i'm getting this error
File "main.py", line 14
elif input_month == ('February') and input_day >1 and input_day <29:
^
SyntaxError: invalid syntax
Here's what I have so far.
input_month = input()
input_day = int(input())
months = ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')
days = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
if not input_month in months and input_day not in days:
print('Invalid')
elif input_month == ('January') and input_day >=1 and input_day <=31:
print('Winter')
else:
print('Invalid')
elif input_month == ('February') and input_day >1 and input_day <29:
print('Winter')
else:
print('Invalid')