0

Not sure what's wrong with my syntax - beginner

Not sure what I'm doing wrong here. From my understanding, I've clearly defined a variable to be equal to the input, and set up some booleans to compare it to the current year. I'm obviously missing something. #What year is it? current_year = 2017 year = int(input("The current year is ") if year == current_year: print("correct") else: if year < 2017: print("get with the times!") else: print("woah, are you from the future!?")

13th May 2017, 10:26 PM
Darren Gresch
Darren Gresch - avatar
2 Antworten
+ 4
You haven't closed your int brackets year = int(input("The current year is "))
13th May 2017, 10:41 PM
Edward Furey
Edward Furey - avatar
+ 1
*sigh*, thank you! I will definitely start being more meticulous
14th May 2017, 12:25 AM
Darren Gresch
Darren Gresch - avatar