uberpython

uberpython

Joined
Jan 11, 2011

Activity Stream

uberpython commented on a Page, Mini Adventure (For Python 3.1)  -  Jan 11, 2011

thats so weird lol, its like they just combined two different functions lol. either way i'm glad for this posting, learning if elif functions atm in class and modules. :D

 Respond  
uberpython commented on a Page, Mini Adventure (For Python 3.1)  -  Jan 11, 2011

this is what i got:

print ("(Currently running Adventure Script 0.1)")
print("Welcome")
x = raw_input ("Who are you? ")
Left = raw_input
Right = raw_input
Up = raw_input
Down = raw_input
print("Hello there", x)
print("This is your journey, your story", x)
n = raw_input ("Choose a path... left... or right!? Type in Left or Right. ")
if n == ("Left"):
    print ("WRONG, you are dead. You cannot move until someone revives you. Which is never.")
    print ("(Please exit now)")

elif n == ("Right"):
    print ("CORRRRECT!")
    print ("Your adventure is very short, and it is almost over. Yes, I know, lame.")
    y = raw_input ("Choose a direction up down down. Type Up or Down. ")
    if y == ("Up"):
        print ("Correct! You adventure has now ended. Bye.", x ,"has made great history.")
    elif y == ("Down"):
        print ("You lost your adventure! Shoot! You were so close man, you... UGH")
 Respond  
uberpython commented on a Page, Mini Adventure (For Python 3.1)  -  Jan 11, 2011

not sure cause i dont use 3.1, but in order for this snippet to execute correctly, x needs to be declared as a raw_input because names are strings, input is good for intergers but my name isnt 1337 :D also Left and Right Up and Down are not declared so there is errors, too. to make your if elif statements work, it has to be in raw_input

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.