0
この関数は、引数が無効であると主張する入力関数でエラーをスローします。表示されたテキスト - -pythonの入力fuctionで複数の引数を持つ方法
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)
どのようにメソッドを呼び出していますか?正確なエラーメッセージは何ですか?フルトレースバックを表示してください。 – idjaw
トレースバック(最新の呼び出しの最後): ファイル "C:/Users/alec/Desktop/loShuMagicSquare.py" assignSquareValuesでは、ライン46、() ファイル「C:/Users/alec/Desktop/loShuMagicSquare.py "、行39、assignSquareValues square [r] [c] = int(入力"(正方形の数を入力する(1-9)、 "(count)))#、": "、sep =" ") )) TypeError:最大1つの引数が入力されている、2が返されました –
これは私が取得するエラーです.. –