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()
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