def the_flying_circus(knight):
if knight>=2 and knight<=2:
return "i am a knight"
elif knight==2(true or false):
return "i am not a knight"
return "boooooooooooooooooooooooooooooooooooooooooooooooob"
print the_flying_circus(8)
print the_flying_circus(9)
print the_flying_circus(10)


Writing this (true or false) is wrong. (not valid expression in python)
You don't have to mention what certain condition will evaluates to.
We just put conditional expression there and python will turn it into True/False based on condition.

This is suffice

elif knight==2:


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