python - 如何修复这行代码,以免出现任何语法错误?
问题描述
我很新,所以请放轻松。
我不断收到本节的语法错误代码(特别是“print()”并且不知道我做错了什么?有人可以看看并告诉我吗?
def name():
NAME=str(input("Why don't you introduce yourself to them, now that you've caught their eyes?")
print(,NAME, "? Is that right? -yes/no-")
answer = input(">").lower()
解决方案
你错过了 str 函数的 ')' 和下一行你在 print 函数中有额外的 ','
推荐阅读
- python - 如何使用 SHAP ,PDP ?并且模型的特征数量必须与输入误差相匹配
- sql - 添加除一列外具有相同值的新行
- javascript - 基本 JS 文件加载但不渲染或执行 Laravel 8 Bootstrap 5
- react-native - 如何从选项卡导航器打开抽屉导航器
- javascript - 通过 DOM 操作更改 SVG 笔触颜色
- python - 单击单选按钮 Selenium/Python
- java - Java 8+ 流、泛型和 lambda 表达式
- android - 改造:如何从 okhttp 拦截器再次重试请求?
- java - 如何编写反转二维数组的方法
- javascript - 有人可以帮我解决这个 React 教程语法错误吗?