Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #http://learnpythonthehardway.org/book/ex14.html
- #Add another argument and use it in your script.
- #to run C:\Python33>python PTHW14a.py Henry 14
- from sys import argv
- script, user_name, age = argv
- prompt = '>'
- print ("Hi {}, I'm the {} script".format(user_name, script))
- print ("{} you are {} years old. Good to know".format(user_name,age))
- print ("I'd like to ask you a few questions.")
- like = (input("Do you like me {}?".format(user_name)))
- lives = (input("Where do you live {}?".format(user_name)))
- computer = (input("What kind of computer do you have {}?".format(user_name)))
- print ("""
- Alright, so you said {} about liking me.
- You live in {}. I'm not sure where that is.
- And you have a {} computer. Cool. Not bad for someone who is {}.
- """.format(like,lives,computer,age))
Add Comment
Please, Sign In to add comment