Create your own


I don't know what I'm doing wrong. My brother's no help right now insisting that the else statement is in the wrong place. Other examples explicitly show otherwise.

EDIT: Not sure why this works, but not what I want.


Not sure inputing inside the for loop is the way to go. I would use while. Also, by convention we do not start variable names with a capital letter, as this is reserved for classes.

choices = [ ... ]
print " ... "
chances = 3
while True:
    choice = raw_input(" ... ")
    if choice in choices:
        print "Here you go, your, %s" % choice
        chances -= 1
        if chances < 1:
            print "out of chances"



That makes sense. I got them confused.


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