pythonでrandom.shuffleを使ってハンドを処理しようとすると、エラーが発生し続けます。何が問題なのかを理解するのに役立つ人がいます。
# [import statements]
import q1fun
# [constants]
# [rest of program code]
number = input("howmany cards to you want dealt?")
a = q1fun.deal(number)
print (a)
# [import statements]
import random
# [constants]
def deal(x):
y = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
a = random.shuffle(y(x))
return(a)
5 トレースバック (最新のコールが最後): ファイル "C:\Users\Eddie\workspace\cp104\durb8250_a16\src\q1.py", line 18, in a = q1fun.deal(number)ファイル "C:\Users\Eddie\workspace\cp104\durb8250_a16\src\q1fun.py"、29 行目、deal a = random.shuffle(y(x)) TypeError: 'list' object is not callable