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()
原文地址:https://www.cnblogs.com/sea-stream/p/10804929.html
时间: 2024-10-09 18:43:12