Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrianna Washington
576 Pointssyntax
I am getting a syntax error on line one of what was given. Do I need to change the given variable?
admitted = None
if age => 13
admitted = True
1 Answer
Steven Parker
231,275 PointsThe 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.
Stivan Radev
1,475 PointsStivan Radev
1,475 PointsI 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!