[Tutor] Help with else
Enes Unal
aenesunal at gmail.com
Fri Oct 9 11:07:19 CEST 2015
may be this one?
name = raw_input("What is your name")
print "Great! Now %s, are you a boy or a girl?" % (name)
gender = raw_input("")
if gender == "boy":
print " I can see that, you are very strong"
elif gender == "girl":
print ' Yes, and a beautiful one'
else:
print "Your choice"
> On 09 Oct 2015, at 06:31, Nick Brodsky <nickbrodsky1999 at gmail.com> wrote:
>
> name = raw_input("What is your name")
>
> print "Great! Now %s, are you a boy or a girl?" % (name)
>
> gender = raw_input("")
>
> if gender == "boy":
> print " I can see that, you are very strong":
> if gender == "girl":
> print ' Yes, and a beautiful one':
> else:
> print "Your choice"
>
>
> I don't understand why it doesn't work, it just skips over the else. Thanks for
>
> the help!
>
>
> Montreallisting.ca
> Free Montreal Classifieds
>
>
> Gaminggame.com
> Best Game Reviews You'll Find
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list