[Tutor] Python Help

Grady Trexler grady905 at gmail.com
Wed Jan 23 22:37:58 CET 2013


Below is my code.  I am using python 2.4 It tells me I have a syntax error.
 Please help!  (I think the first twenty lines have what you would be
looking for.  After that it just repeats itself.)
#scenario maker
#created by: Grady Trexler
#started on 1/3/13
#last update: 1/3/13

def rungame()
guyone = raw_input("Please enter a name:")

guytwo = raw_input("Please enter a name:")

g1pers = raw_input("Please enter a personality: happy, sad or mad:")

g2pers = raw_input("Please enter a personality: happy, sad or mad:")

place = raw_input("Please enter a place: theater, mall, or gamestop:")

if g1pers == "happy" and g2pers == "happy" and place == "theater" :
print "%s: Wow!  I can't wait to see this movie!" % (guyone)
print "%s: Me too!  My mom says it is awesome!" % (guytwo)
print "%s and %s high five." % (guyone, guytwo)
print "Then %s and %s became best friends." % (guyone, guytwo)
elif g1pers == "happy" and g2pers == "happy" and place == "mall" :
print "%s and %s met in the mall at the food court." % (guyone, guytwo)
print "%s: Why are you here?" % (guytwo)
print "%s: I went to Barnes and Noble.  You?"  % (guyone)
print "%s: I came to shop for clothing.  Bye now!" % (guytwo)
print "%s: Goodbye!" % (guyone)
print "%s and %s would never meet again, but would remain to be happy
forever."  % (guyone, guytwo)
elif g1pers == "happy" and g2pers == "happy" and place == "gamestop" :
print "Waiting in line at Gamestop, %s struck up a conversation with the
person next to him, who was %s."  % (guyone, guytwo)
print "%s: What are you coming to buy?"  % (guytwo)
print "%s: Halo 4.  You?" % (guyone)
print "%s: Some games for my NES, as well as COD 3."  % (guyone)
print "%s: NES?"  % (guytwo)
print "%s: Nintendo Entertainment System, Nintendo's original console.  No
Halo's for that bad boy."  % (guytwo)
print "%s: Oh, cool." % (guyone)
print "%s and %s left Gamestop and went home."
elif g1pers == "happy"  and g2pers == "sad" and place == "theater" :
print "%s and %s were in line next to eachother." % (guyone, guytwo)
print "%s, sensing %s was sad tried to start a conversation." % (guyone,
guytwo)
print "%s: What's wrong, brother?" % (guyone)
print "%s: EVERYTHING!!!!" % (guytwo)
print "%s pushed passed %s and ran away.  The two never saw eachother
again." % (guytwo, guyone)
rungame()
-- 
--T-rexmix
Check out my website-
www.thegradypage.weebly.com
It has new blog posts all the time!
Fight against Gandalf. Like a Balrog.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130123/58d531f0/attachment-0001.html>


More information about the Tutor mailing list