python - Conditionals & Control Flow - The Big If -
very simple! did wrong? typed 5 , returned false... did miss?
# make sure the_flying_circus() returns true def the_flying_circus(): print "press number 5 otherwise return false" = raw_input() if == 5: print "correct!" return true # start coding here! # don't forget indent # code inside block! elif != 5: print "wrong" return false # keep going here. # you'll want add else statement, too! else: return false the_flying_circus() print "thank playing!"
you need convert raw_input
int
.
raw_input()
returns string
do a = int(raw_input())
Comments
Post a Comment