Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

How would this fuction work in Python?


ghost's Avatar
0 0

Hey I am having a tad of trouble because I cannot find a good handling article or segment. Here is a part of the code.

elif input() == "no" print "What next " + alias```

ghost's Avatar
0 0

You know input returns a integer value. eg:

>>> a = input()
123
>>> type(a)
<type 'int'>
>>> 

It seems like you are wanting to use raw_input().

alias = "moo"
a = raw_input("question asdf: ")
if a == "yes": print "ORLY?!"
elif a == "no": print "What next %s?" % alias

ghost's Avatar
0 0

Yess. Thank you. I was missing the : and the raw_input switch of course. Thanks again.