Skip to content

Instantly share code, notes, and snippets.

@blammothyst
Created February 27, 2014 20:27
Show Gist options
  • Save blammothyst/9258832 to your computer and use it in GitHub Desktop.
Save blammothyst/9258832 to your computer and use it in GitHub Desktop.
Code from Learn Python the Hard Way(.org) ex 14
from sys import argv
script, user_name = argv
prompt = 'type that shit out son! '
print "Hi%s, I'm the %s script." % (user_name, script)
print "I'd like to ask you a few questions."
print "Do you like me %s?" % user_name
likes = raw_input(prompt)
print "Where do you live %s?" % user_name
lives = raw_input (prompt)
print "What kind of a computer do you have %s?" % user_name
computer = raw_input (prompt)
print """
Alright, so you said %r about liking me.
You lie in %r. Not sure where that is.
And you have a %r computer. Nice.
""" % (likes, lives, computer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment