#boundary Checking
if goals[count].ycor() > 240 or goals[count].ycor() < -240:
goals[count].right(180)
#collision checking
if isCollision(player, goals[count]):
goals[count].setposition(random.randint(-250, 250), random.randint(-250, 250))
goals[count].right(random.randint(0,360))
score += 1
#Drwa the score on the screen
mypen.undo()
mypen.penup()
mypen.hideturtle()
mypen.setposition(-240, )
scorestring = "Score: %s" %score
mypen.write(scorestring, False, align="left", font=("Arial",14, "normal")
delay = raw_input("press Enter to Finish")
答案 0 :(得分:0)
这个问题有点细节上的欠缺,但是马上我就能看到一个潜在的问题。 Python 2和更早版本中的raw_input()
函数在Python 3中被重命名为input()