很简单!我哪里弄错的?我输入了5,结果返回false。。。我错过了什么?在
# Make sure that the_flying_circus() returns True
def the_flying_circus():
print "Press number 5 otherwise it will return false"
a = raw_input()
if a == 5:
print "Correct!"
return True
# Start coding here!
# Don't forget to indent
# the code inside this block!
elif a != 5:
print "Wrong"
return False
# Keep going here.
# You'll want to add the else statement, too!
else:
return False
the_flying_circus()
print "Thank you for playing!"
raw_input
始终返回字符串。“5“不等于。在您需要将您的
raw_input
转换为int
。在raw_input()
始终返回string
做
a = int(raw_input())
相关问题 更多 >
编程相关推荐