-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex14.py
29 lines (23 loc) · 867 Bytes
/
ex14.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from sys import argv
#script calls an argument defined at execution
script, user_name = argv
#prompt can be anything as long as it is quoted
prompt = '> '
#takes the argument provided and uses the script name
#stores input in the likes variable
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)
#stores input in lives variable
print "Where do you live %s?" % user_name
lives = raw_input(prompt)
#stores input in computer variable
print "What kind of computer do you have?"
computer = raw_input(prompt)
#uses style multi-line string and shows all user inputs
print """
Alright, so you said %r about liking me.
You live in %r. Not sure where that is.
And you have a %r computer. Nice.
""" % (likes, lives, computer)