此函数向输入函数抛出错误,声明参数无效。。有什么决议吗?
def assignSquareValues():
square=[[0,0,0],
[0,0,0],
[0,0,0]]
count=0
try:
for r in range(3):
for c in range(3):
count+=1
print(count)
square[r][c]= int(input(("Enter a number(1-9) for square #",(count)+":",sep=''))) #this line throws an error stating that "TypeError: input expected at most 1 arguments, got 2"
except Exception as err:
print(err)
assignSquareValues()
checkMagicSquare(square)
input()
需要一个参数-显示文本-因此必须将所有参数连接到一个文本中也就是说
或者
^{pr2}$相关问题 更多 >
编程相关推荐