用Python代码画出滑稽表情

简介

用python代码画出滑稽表情,仅使用turtle库。如下:
在这里插入图片描述

绘画过程可以在下列平台查看:

抖音:我敢保证,你身边一定有这样的人
b站:我敢保证,你身边一定有这样的人_哔哩哔哩_bilibili

代码

# coding=gbk

from turtle import*

setup(1000,700,100,90)
shape('turtle')
turtlesize(1.5, 1.5, 1.5)
speed(10)

penup()
setheading(-90)
fd(250)
pendown()
color("yellow")
begin_fill()
setheading(0)
circle(250)
end_fill()

penup()
seth(90)
fd(370)
seth(180)
fd(200)
seth(10)
pendown()

color(1,1,1)
pensize(30)
circle(-400,20)

seth(170)
circle(400,20)

penup()
seth(0)
fd(400)
pendown()

seth(170)
circle(400,20)

penup()
seth(-90)
fd(10)
pendown()

seth(0)
color(0,0,0)
pensize(1)
begin_fill()
circle(12)
end_fill()

penup()
seth(90)
fd(10)
seth(10)
circle(-400,20)
seth(180)
fd(400)
seth(-90)
fd(10)
pendown()

seth(0)
begin_fill()
circle(12)
end_fill()

penup()
seth(90)
fd(10)
seth(0)
fd(200)
seth(-90)
fd(320)
seth(-180)
circle(-200,80)
pendown()

seth(-80)
pensize(10)
circle(200,160)

hideturtle()
done()

运行效果

在这里插入图片描述

备注

视频已发布到抖音和 b 站。抖音和b站名称:会代码的依古比古

抖音视频网址:我敢保证,你身边一定有这样的人

b站视频网址:我敢保证,你身边一定有这样的人_哔哩哔哩_bilibili

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值