python turtle画笑脸_如何用python画笑脸QQ表情——turtle库实践

news/2024/7/6 13:03:00

from turtle import *

screensize(600,600)

speed(10)

#笑脸的小圆脸

pensize(5)

color('dim grey','yellow')

pu()

goto(0,-100)

begin_fill()

circle(100)

end_fill()

#腮红

#左侧

seth(90)

color('Light Pink','Light Pink')

pu()

goto(-55,-5)

pd()

begin_fill()

circle(20)

end_fill()

#右侧

color('Light Pink','Light Pink')

pu()

goto(55,-5)

pd()

begin_fill()

circle(-20)

end_fill()

#笑脸的眼睛

#左眼

color('dim grey','white')

pu()

goto(-10,22)

pd()

begin_fill()

circle(25)

end_fill()

#左瞳

color('dim grey','dim grey')

pu()

goto(-10,22)

seth(90)

pd()

begin_fill()

circle(25,-180)

end_fill()

#右眼

color('dim grey','white')

pu()

goto(10,22)

seth(90)

pd()

begin_fill()

circle(-25)

end_fill()

#右瞳

color('dim grey','dim grey')

pu()

goto(10,22)

seth(90)

pd()

begin_fill()

circle(-25,-180)

end_fill()

#笑脸的嘴巴

#左

pu()

goto(-4,-43)

seth(80)

pd()

circle(16,-200)

#右

pu()

goto(4,-43)

seth(110)

pd()

circle(-16,-185)

#连接

pu()

goto(4,-43)

seth(90)

pd()

circle(4,180)

hideturtle()


http://www.niftyadmin.cn/n/2422872.html

相关文章

maven项目迁入内网的各个坑

前言:我之前做的一个项目一直是在内网环境,进行开发的时候是在外网开发好了后打包传入内网。有许多的不便 因此我整个项目迁入内网才内网开发,琢磨了好一会才找到各个问题的解决方案。最近公司新进了一个新同事 然后让我带带,这就…

npm 模块安装机制简介

npm 是 Node 的模块管理器,功能极其强大。它是 Node 获得成功的重要原因之一。 正因为有了npm,我们只要一行命令,就能安装别人写好的模块 。 $ npm install 本文介绍 npm 模块安装机制的细节,以及如何解决安装速度慢的问题。 一、…

python在linux中的应用_Linux中为Python应用安装uwsgi

一般直接用pip install uwsgi可能会出错,所以在这之前先安装其他必要的引用库yum groupinstall "Development tools"yum install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-develyum install pytho…

SSL3_GET_SERVER_CERTIFICATE 错误解决办法

requests模块之前一直正常的,某一天开始对https的请求都抛错误了:requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed完整的: /usr/local/lib/python…

SAP HUM HUPAST 界面里的Packing Station何处定义?

SAP HUM HUPAST 界面里的Packing Station何处定义? Tcode: HUPAST. Packing Station 选项的清单何处被定义的? 如下地方定义的: 具体定义界面如下: 2016-06-08 写于武汉市

python中sys模块是干什么的_python中sys模块的介绍和使用

python中sys模块的介绍和使用发布时间:2020-05-27 21:19:12来源:亿速云阅读:149作者:鸽子在python sys模块提供对解释器使用或维护的一些变量的访问,以及与解释器强烈交互的函数!一.sys模块简介sys.argv —…

mysql 集群 与 网络分区_mysql 集群与分区

mysql 集群与分区一、主从集群配置原理:主服务器建立二进制日志,每产生语句或磁盘变化,写进日志;从服务器读取主服务器的二进制日志从而建立relaylog日志;然而主服务器需要授权复制账号给从服务器来监听二进制日志。a)…

mysql语句求按字段分组后组数是多少

select count(distinct ID) from table Thinkphp CURD写 $count $model->where($where)->count(distinct 字段名);