条件与控制流

2024-03-29 00:24:29 发布

您现在位置:Python中文网/ 问答频道 /正文

很简单!我哪里弄错的?我输入了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!"

Tags: thetofalsetruemakereturnthathere