15/15


#1

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"
else:
return "boooooooooooooooooooooooooooooooooooooooooooooooob"
print the_flying_circus(8)
print the_flying_circus(9)
print the_flying_circus(10)


#2

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:


#3

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