import turtle # 設置畫布大小 # turtle.screensize(canvwidth=None, canvheight=None, bg=None) turtle.setup(500,500,200,200) # 設置初始位置 turtle.penup() turtle.left(90) turtle.fd(-150) turtle.pendown() turtle.right(90) # 輸出文字 printer = turtle.Turtle() printer.hideturtle() printer.penup() printer.back(200) printer.write(" from 歐錦濤", align="center", font=("黑體", 12, "normal")) import turtle as t t.fillcolor("red") t.begin_fill() for i in range(5): t.fd(300) t.right(144) t.end_fill() t.done()