Another Big if problem


#1



https://www.codecademy.com/en/courses/python-beginner-BxUFN/4/1?curriculum_id=4f89dab3d788890003000096


Hi can anybody tell me why this code won't run the last else: statement? Also I get this errormessage that I can't understand. Please can somebody help me?

Oops, try again. The following exception was raised when calling the_flying_circus(): SyntaxError: unexpected EOF while parsing (, line 0)


 def  the_flying_circus():
      a=input("enter your age")
      if (a>=18 and a<=21): 
        print "young, but not allowed to marry"
        return True
      elif (a>=21):
        print "Yeah, you can marry"
        return True
      elif (a<18):
        print "age is too low"
        return True
      else:
        print "something you enterd which is not age"
        return True
the_flying_circus()


#2

the exercise will also call your function, but not enter anything, this will cause problems

also, in python2 (here on codecademy) use raw_input


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.