0
當我運行代碼的功能根本就不
工作,這裏的問題代碼,希望能幫到你:Python龜如何在while循環中使用onKey函數?
import turtle
。
。
。
plinput = 0
while plinput == 0:
def OnePlayer():
global plinput
plinput = 1
def TwoPlayers():
global plinput
plinput = 1
def ThreePlayers():
global plinput
plinput = 1
def FourPlayers():
global plinput
plinput = 1
onkey(Oneplayer, "1")
onkey(TwoPlayers, "2")
onkey(ThreePlayers, "3")
onkey(FourPlayers, "4")<br>
。
。
。
感謝這是非常重要的
只是猜測:也許這是你所有關於你的行縮進!?請提供一個完整且可運行的示例。 http://stackoverflow.com/help/mcve – infotoni91
請解釋此代碼的預期行爲。即,當您運行此代碼時您期望什麼。 –