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 trialPiyush Chawla
Courses Plus Student 30 Pointswhat is wrong in my code
I think I have written correctly but it is showing an error
admitted=None
if(age>=13):
admitted=True
3 Answers
Anjali Pasupathy
28,883 PointsYou're close, but your syntax is a little off. You need to remove the parentheses around the condition.
admitted=None
if age>=13:
admitted=True
I hope this helps!
Shane Robinson
7,324 PointsI'm not sure of the reason for this, but it doesn't work with () around the condition.
Do it like this:
if age >= 13:
admitted = True
Sahil Sharma
4,791 PointsYou can edit out the parenthesis to make your code pass this level but in practice you should use parenthesis. Treehouse challenges have a criteria for passing a particular code, they match your code with the correct answer and check the output of a couple of inputs, in this case you have encountered a bug/error. PS: Try running the same code in workspaces or on your machine, because it should work.