这是我的代码:
import turtle
t = turtle.Turtle()
t.width(5)
t.right(112.5)
t.forward(100)
t.circle(50, 225)
t.forward(100)
t.hideturtle()
它几乎形成了正确的形状,但顶部的两点没有互相相遇。
可能圆的半径不对,或者还有其他错误。请修复我的代码
您需要从一开始就添加更多角度并调整圆圈以使其正确。
import turtle
t = turtle.Turtle()
t.width(5)
t.right(120)
t.forward(150)
t.circle(90, 240)
t.forward(150)
t.hideturtle()
turtle.done()