I am trying to code a text chat engine that give you certain possibilities such A, B, C, and those are linked to texts that has been showed on the screen beforely. How can I code such a script?, that when the user pushes A, it will automatically choose the before handed text that I have writen. I am not now at my own computer but I will post the code soon as I get my own laptop soon. Please help.
- Code: Select all
age = raw_input(("How old are you? "))
print "So you are " + age
print "I am still a baby. I just got created by my programmer."
print "Where do you want to go?"
print "1)To bathroom?"
print "2)to tv room?"
print "3)to outside?"
print "type your number!"
vastaus = int(raw_input(''))
if vastaus < 1 :
I need to know how to make "If user chooce A or 1, then will happend X or 2, if user chooses B or 3 then will happend Y or 4 and so on" How can I create that?