python代码返回语法相关错误
发布时间:2022-05-26 01:30:05 347
相关标签: # node.js
我的 Atom 阅读器在这里收到一条错误消息,提示第print.(f"message")
一个错误消息:
File "/Users/permanentmajority/Desktop/Coding/learnpythonbook.py", line 75
print(f"Let's talk about {my_name}.")
^
SyntaxError: invalid syntax
[Finished in 0.077s]
代码:
my_name = 'Zed A. Shaw'
my_age = 35 # not a lie
my_height = 74 # inches
my_weight = 180 #lbs
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'
print(f"Let's talk about {my_name}.")
print(f"He's {my_height} inches tall.")
print(f"He's {my_weight} pounds heavy.")
print("Actually that's not too heavy.")
print(f"He's got {my_eyes} eyes and {my_hair} hair.")
print(f"His teeth are usually {my_teeth} depending on the coffee.")
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报