Stuck on Python, Thanks :)


Make sure that the_flying_circus() returns True

def the_flying_circus():
if answer > 1 :
return True# Start coding here!
# Don't forget to indent
# the code inside this block!
elif answer == 1:
return False
else not answer >=1:
return True
# Keep going here.
# You'll want to add the else statement, too!

File "python", line 9
else not answer >=1:
SyntaxError: invalid syntax

Replace this line with your code.


when you write an if- else statements the last statement meaning the single else statement should be without any condition...(if you are familiar with other languages this is like the 'defult' in a switch).
so the write way to write this line is : line 9 - else :
also I think there is some problem with your logic. you should enter the else if you are smaller then 1 not >=1 .
also to make sure you complete the mission (Make sure that the_flying_circus() returns True) and not just succeed to compile the program without any syntax errors you should replace the "return False" on line 7 to "return True" since you want that to return true in every case.


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