Python Turtle库绘制小黄脸表情包

Python Turtle库绘制小黄脸表情包

在这里插入图片描述
下面只有一个表情的代码
请添加图片描述

#!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__: "TC"
import turtle

turtle.setup(500, 600)
turtle.pencolor("#B26A0F")
turtle.begin_fill()
turtle.circle(100)
turtle.fillcolor("#F9E549")
turtle.end_fill()
turtle.home()

turtle.penup()
turtle.goto(-10, 100)
turtle.pendown()
turtle.pensize(2)
turtle.setheading(90)
turtle.color("sienna")
turtle.circle(20,180)

turtle.penup()
turtle.goto(50, 100)
turtle.pendown()
turtle.setheading(90)
turtle.color("sienna")
turtle.circle(20,180)
turtle.penup()

turtle.goto(55, 80)
turtle.pendown()
turtle.pensize(2)
turtle.setheading(-90)
turtle.begin_fill()
turtle.pencolor("sienna")
turtle.circle(-55,180)
turtle.setheading(0)
turtle.forward(110)
turtle.fillcolor('sienna')
turtle.end_fill()

turtle.goto(55, 80)
turtle.pendown()
turtle.pensize(2)
turtle.setheading(-90)
turtle.begin_fill()
turtle.pencolor("sienna")
turtle.circle(-55,10)
turtle.setheading(180)
turtle.forward(108)
turtle.setheading(90)
turtle.circle(55,10)
turtle.setheading(0)
turtle.forward(110)
turtle.fillcolor('white')
turtle.end_fill()

#m帽子
turtle.penup()
turtle.pencolor('silver')
turtle.goto(-100, 150)
turtle.pensize(1)
turtle.pendown()
turtle.setheading(-120)
turtle.forward(10)
turtle.left(1)
turtle.setheading(-100)
turtle.circle(40,10)
turtle.forward(60)
turtle.right(1)
turtle.circle(-60,10)
turtle.forward(30)
turtle.right(5)
turtle.circle(30,90)
turtle.forward(20)
turtle.right(3)
turtle.circle(20,10)
turtle.forward(50)
turtle.circle(10,20)
turtle.setheading(10)
turtle.circle(40,30)
turtle.right(2)
turtle.forward(10)
turtle.setheading(5)
turtle.forward(30)
turtle.circle(50,30)
turtle.setheading(4)
turtle.forward(30)
turtle.circle(700,10)###
turtle.circle(20,100)
turtle.setheading(143)
turtle.forward(170)
turtle.setheading(130)
turtle.forward(20)
turtle.circle(90,50)
turtle.forward(20)
turtle.pencolor('white')
turtle.setheading(180)
turtle.circle(90,70)
turtle.begin_fill()

turtle.fillcolor('white')
turtle.forward(20)
turtle.setheading(-5)
turtle.circle(90,30)
turtle.setheading(10)
turtle.circle(-80,30)
turtle.forward(10)
turtle.setheading(1)
turtle.circle(400,10)
turtle.setheading(-45)
turtle.pencolor('snow2')
turtle.circle(1000,10)
turtle.setheading(2.5)
turtle.forward(2)
turtle.pencolor('silver')

turtle.circle(30,5)###
turtle.circle(35,100)
turtle.setheading(145)
turtle.forward(170)
turtle.setheading(130)
turtle.forward(20)
turtle.circle(90,50)
turtle.forward(20)
turtle.setheading(180)
turtle.circle(90,70)
turtle.forward(15)
turtle.end_fill()

turtle.penup()
turtle.goto(-101, 150)
turtle.color("Black")
turtle.pendown()
turtle.pensize(10)
turtle.setheading(0)
turtle.circle(2000,3)
turtle.right(2)
turtle.circle(2011,3)

turtle.hideturtle()
turtle. Done()

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

TC_zyq

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值