Python Python Basics (2015) Logic in Python Conditional Value

It shows invalid syntax while working in quiz

It shows invalid syntax. while working with quiz. where i'm going wrong
admitted = 2
age = 12;

if (amitted < age):

1 Answer

Hey srinath! I think you need to read the instructions again, but ill give you some hard pointers:

  • When making an "if" statement, dont put parenthesis around the condition.
  • You shouldent create the age variable yourself, it has already been created, so remove that.
  • You shouldent change the admitted variable, leave it equal to None.
  • You shouldent print anything in this challenge.
  • You shouldent check if admitted < age. You should check wether age is greater that or equal to 13. Use "<=" operator for that.
  • An else statement should go directly under the if, not indented.
if (Your condition): # Ignore parenthesis
    # Do something
else: # Dont indent this else statement
    # Do something else

Please write back if you need more help!