ex14
This commit is contained in:
parent
ed8222535a
commit
d2e57f15f2
3 changed files with 45 additions and 0 deletions
21
sami/learn-python-the-hard-way/ex14.py
Normal file
21
sami/learn-python-the-hard-way/ex14.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from sys import argv
|
||||
|
||||
script, user_name = argv
|
||||
prompt = '> '
|
||||
|
||||
print(f"Hi {user_name}, I'm the {script} script.")
|
||||
print("I'd like to ask you a few questions.")
|
||||
print(f"Do you like me {user_name}?")
|
||||
likes = input(prompt)
|
||||
|
||||
print(f"Where do you live {user_name}?")
|
||||
lives = input(prompt)
|
||||
|
||||
print("What kind of computer do you have?")
|
||||
computer = input(prompt)
|
||||
|
||||
print(f"""
|
||||
Alright, so you said {likes} about liking me.
|
||||
You live in {lives}.
|
||||
And you have a {computer} computer.
|
||||
""")
|
||||
Loading…
Add table
Add a link
Reference in a new issue