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!
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 trial
Piyush ChawlaCourses Plus Student 30 Points
what is wrong in my code
I think I have written correctly but it is showing an error
admitted=None if(age>=13): admitted=True
Anjali Pasupathy28,883 Points
You'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 Robinson7,324 Points
I'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 Sharma4,791 Points
You 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.