Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

learn-python3-ex14.py #10

Open
weihongying opened this issue Aug 3, 2018 · 1 comment
Open

learn-python3-ex14.py #10

weihongying opened this issue Aug 3, 2018 · 1 comment

Comments

@weihongying
Copy link

Hi,I write the script with the same as book, but, it can not work:
`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(f"What kind of computer do you have?")
computer = input(prompt

print(f"""
Alright, so you said {likes} about liking me.
You live in {lives}. Not sure where that is.
And you have a (computer} computer. Nice.
""")`

The error is :
File "ex14.py", line 17 print(f""" ^ SyntaxError: invalid syntax

@thongntit
Copy link

@weihongying Hi,
at line 15 you have missed the close parentheses
and in line 20 (computer} replace parentheses with braces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants