Python Python Basics (2015) Logic in Python Conditional Value

syntax

I am getting a syntax error on line one of what was given. Do I need to change the given variable?

conditions.py
admitted = None
if age => 13
   admitted = True
Stivan Radev
Stivan Radev
1,473 Points

I just saw your mistake, actually the 2 mistakes that you made. First, the "=>", just like what Steven Parker said below, it should be ">=" (Thanks @StevenParker) Second, in the video, you can see that he used this " if age > 10000:", as you can see there is this at the end of the number ":". So basically you forgot to put : at the end of the number 13.

admitted = None if age >= 13: admitted = True

Good luck!

1 Answer

Steven Parker
Steven Parker
168,451 Points

The symbol for the operator is the issue. The correct symbol for a "greater than or equal" comparison is ">=".

And as Stivan pointed out, an "if" statement should end with a colon.