You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: