【发布时间】:2021-01-31 17:58:19
【问题描述】:
这是我运行它时给我的。
Traceback (most recent call last):
File "main.py", line 6, in <module>
name2 = int(input("What whould you like me to call you", name1))
TypeError: input expected at most 1 argument, got 2
这是我的工作
#Birthday
feeling = input("Hello, how are you doing? ")
print("Good to hear you're doing well")
name1 = input("And what is your name: " )
print("Lovely name ;) ")
name2 = int(input("What would you like me to call you", name1))
print("Welcome to Birthday Plaza where we do all the work for you", name2)
【问题讨论】:
-
你为什么要输入 name2??
-
阅读文档:
input只接受一个参数。您必须为提示连接所需的字符串。用逗号分隔片段不起作用。
标签: python