code

import turtle
n = eval(input("请输入五角星的长度"))
turtle.begin_fill() #开始填充颜色
i = 0
while i < 5:
    turtle.forward(n)
    turtle.right(180-36)
    i += 1
turtle.color("blue") # 退出填充颜色
turtle.end_fill()
turtle.done()

 

python 绘制五角星

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-02-26
  • 2021-09-05
  • 2022-01-29
  • 2021-07-12
  • 2021-12-08
  • 2022-12-23
相关资源
相似解决方案