#coding=utf-8 # arrow(海龟箭头);turtle(实心箭头);circle(实心方形箭头);square(粗大箭头2);triangle(classic) from turtle import * def position(x,y): up() goto(x,y) down() def draw(size,x,y): position(x,y) color(‘yellow‘) begin_fill() fillcolor(‘yellow‘) for i in range(5): forward(size) if(size==150): right(144) else: left(144) end_fill() bgcolor(‘red‘) #速度 speed(5) #画大星 draw(150,-300,160) #画四个小星 draw(50,-180,250) draw(50,-80,200) draw(50,-80,90) draw(50,-180,10) #省略箭头 hideturtle() done()
原文地址:https://www.cnblogs.com/tiankongyiluozhiwu/p/8570758.html
时间: 2024-11-13 08:23:08