Python画鸡蛋函数

Python画鸡蛋函数 turtle draw egg function

Python画鸡蛋函数 turtle draw egg function

"""
   Python画鸡蛋函数
"""

import turtle

screen = turtle.Screen()
screen.setup(480,360)
screen.title("画鸡蛋")

def main():
    """主要执行函数"""
        
    turtle.color('#CF713D')
    draw_egg(0,0,50,45)
    draw_egg(120,0,50,-45)
    draw_egg(0,-150,20,-90)
    draw_egg(-150,0,30,180)
    draw_egg(-50,-100,20,90)
    draw_egg(150,-100,50,-90)

    turtle.hideturtle()
    screen.mainloop()

def draw_egg(x,y,size,tilt):
    """画蛋函数"""
    

You must log in to read the rest of this article. Please log in or register as a user.