turtle库——精灵球

from turtle import*


setup(800, 800)
hideturtle()
speed(10)
pensize(12)

# 上半部分
begin_fill()
fillcolor(1, 0, 0)
penup()
fd(-200)
pendown()
fd(400)
left(90)
circle(200, 180)
end_fill()

# 下半部分
circle(200, 180)

# 中间按钮
right(90)
penup()
goto(0, -60)
pendown()
begin_fill()
fillcolor(1, 1, 1)
circle(60, 360)
end_fill()

penup()
goto(0, -30)
pensize(6)
pendown()
begin_fill()
fillcolor(1, 1, 1)
circle(30, 360)
end_fill()

done()

Python基础任务6

相关文章:

  • 2021-04-28
  • 2021-12-28
  • 2021-11-08
  • 2021-12-17
  • 2021-09-16
  • 2021-05-03
  • 2021-09-03
猜你喜欢
  • 2021-07-19
  • 2021-08-07
  • 2021-05-30
  • 2021-12-19
  • 2021-12-07
  • 2021-07-31
相关资源
相似解决方案