如何修复涉及Turtle Graphics Module for Python 3的无效语法

时间:2019-02-05 00:31:48

标签: python python-3.x turtle-graphics

我正在尝试使用乌龟图形创建太空侵略者计分板。唯一的问题是,当我尝试使用score_pen.hideturtle()时,它作为无效语法弹出。我不太确定是什么问题...

import turtle

# Draw the score
score_pen = turtle.Turtle()
score_pen.speed(0)
score_pen.color("white")
score_pen.penup()
score_pen.setposition(-290, 280)
scorestring = "Score: %s" % score
score_pen.write(scorestring, False, align="left", font=("Arial", 14, "normal")
score_pen.hideturtle()

0 个答案:

没有答案