我想要做的就是讓我的循環使用距離公式每秒鐘移動龜。但是,每次嘗試使用公式時都會出現此錯誤。有誰知道我要去哪裏?TypeError:第15行Pow:'list'和'int'的不受支持的操作數類型
- 進口龜
- WN = turtle.Screen()
- 託尼= turtle.Turtle()
- tony.shape( 「龜」)
- tony.pensize(5)
- tony.up()
- tony.left(90)
- tony.forward(100)
- tony.l EFT(180)
10.tony.down()
11.gravity =浮子(10.3)
- 對於i在[1,2, 3,4,5,6,7,8,9,10]:
- tony.stamp()
- 時間=範圍(1,10,1)
- 距離=浮子((重力/ 2) *((時間** 2) - ((時間-1)** 2)))
- tony.forward(distance)
此評論對A TON有幫助!我得到它的工作,並真正明白我做錯了什麼。非常感謝你的幫助! – Cakers