Python Variable Subtracting and If/Else statements
Go to solution
Solved by reniat,
instead of = < do <= for less than or equal to
Also, make sure to indent the lines in the if and else statement since python uses indentation to structure logic:
if current_year - int(patron_year) <= alchohol_consumtion_age: print("Tsk, Tsk, no alcohol for you") else: print("It's Beer O'Clock, my dude or dudette")

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now