# -*- coding: utf-8 -*- """ Created on Thu Nov 4 19:11:14 2021 @author: SHI Baoming """ from turtle import * # 定义画花瓣的函数 def drawLeaf(): begin_fill() for i in range(2): for i in range(15): lt(6) fd(5) lt(90) end_fill() #主程序开始 speed(0) pu() goto(0,-200) # 画花柄 pd() color('black','green') for i in range(2): lt(90) fd(100) drawLeaf() rt(90) drawLeaf() # 画花朵 lt(90) fd(130) color('black','red') for i in range(12): drawLeaf() lt(360/12) # 画花心的圆圈 pu() lt(90) fd(-10) rt(90) pd() color('black','yellow') begin_fill() circle(10) end_fill() hideturtle() done()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)