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!?")
2 odpowiedzi
+ 4
You haven't closed your int brackets
year = int(input("The current year is "))
+ 1
*sigh*, thank you! I will definitely start being more meticulous