samedi 9 juillet 2016

Using multiple inputs for raw_input python

Hi this is my first question. I started working on learning python this week and I started making simple programs. I started making a raw_input program, so the console asks a question like "Hi how are you?" and no matter what you respond with it would say the same thing. Is there a way I could make it so that if I say good it would say "Awesome!..." then ask another question like "Awesome! How old are you?" Something like that? This is my simple code so far.

print "Hello! THis is a simple program created by myselF! It will ask a variety of simple questions!"

how_are_you = raw_input("How are you?")
print how_are_you

age = raw_input("Good, glad to hear it! How old are you?") # Or "Aw thats not good hopefully this will change that. blah blah blah.
print age

Aucun commentaire:

Enregistrer un commentaire