Python教程44:海龟画图turtle画卡塔尔世界杯吉祥物

---------------turtle源码集合---------------

Python教程42:海龟画图turtle画海绵宝宝

Python教程41:海龟画图turtle画蜡笔小新

Python教程40:使用turtle画一只杰瑞

Python教程39:使用turtle画美国队长盾牌

Python教程38:使用turtle画动态粒子爱心+文字爱心

Python教程37:使用turtle画一个戴帽子的皮卡丘

Python教程36:海龟画图turtle写春联

Python源码35:海龟画图turtle画中国结

Python源码31:海龟画图turtle画七道彩虹

Python源码30:海龟画图turtle画紫色的小熊

Python源码29:海龟画图turtle画太极图

Python源码28:海龟画图turtle画熊猫

Python源码27:海龟画图turtle画动态圆舞曲

Python源码26:海龟画图turtle画向日葵

Python源码25:海龟画图turtle画小猪佩奇

Python源码24:使用海龟画图turtle画滑板

Python源码23:使用海龟画图turtle画小狗狗

Python源码22:使用海龟画图turtle画今天日期

Python源码21:使用海龟画图turtle画太阳,云朵,房子,绿树

Python源码20:使用海龟画图turtle画一个会动的星空

Python源码19:海龟画图turtle画螺旋的彩色的逐渐放大的文字

Python源码18:使用海龟画图turtle画捂脸表情

Python源码17:使用海龟画图turtle画五星红旗

Python源码16:使用海龟画图turtle画会动的时钟

Python源码15:使用海龟画图turtle画小黄人

Python源码14:使用海龟画图turtle画我的城堡

Python源码分享13:使用海龟画图turtle画一个会眨眼的皮卡丘

Python源码分享12:使用turtle画彩色六边形

Python源码分享11:使用海龟画图turtle画航天火箭

Python源码分享10:使用海龟画图turtle画哆啦A梦

Python源代码分享:02海龟画图五角星

Python源代码分享:03画一个奥运五环图

Python源代码分享:05使用turtle模块绘制一个彩色螺旋图案

Python源代码分享:07画满天繁星

Python源码分享08:使用turtle画一朵玫瑰花

Python源码分享10:使用海龟画图turtle画哆啦A梦

Python源码分享11:使用海龟画图turtle画航天火箭

Python源码分享12:使用turtle画彩色六边形
在这里插入图片描述

# @Author : 小红牛
# 微信公众号:WdPython
import turtle as t
# 设置背景颜色,窗口位置以及大小t.colormode(255)  # 颜色模式
t.speed(0)
t.screensize(800, 700, "black")  # 画布大小背景颜色
t.setup(width=800, height=700, startx=None, starty=None)  # 绘图窗口的大小和起始坐标t.title('2022卡塔尔世界杯吉元素!')  # 设置绘图窗口的标题
t.resizemode('noresize')  # 大小调整模式:auto,user,noresize
t.tracer(1)
t.hideturtle()def mlingpen(x, y):t.penup()t.goto(x, y)t.pendown()def mlingfacecheek(x, y, fx):mlingpen(x, y)t.seth(fx)t.pencolor("#fcd1ae")t.fillcolor('#fcd1ae')t.begin_fill()n = 1.8for i in range(120):if 0 <= i < 30 or 60 <= i < 90:n -= 0.05t.left(3)t.fd(n)else:n += 0.05t.left(3)t.fd(n)t.end_fill()def mlingfacecheek_h(x, y, fx):mlingpen(x, y)t.seth(fx)t.pencolor("#fcc6ae")t.fillcolor('#fcc6ae')t.begin_fill()n = 1.6for i in range(120):if 0 <= i < 30 or 60 <= i < 90:n -= 0.06t.left(3)t.fd(n)else:n += 0.06t.left(3)t.fd(n)t.end_fill()def mlingellipse(x, y, jiajiao, l, size, color1, color2):mlingpen(x, y)t.seth(jiajiao + 270)t.pensize(size)t.pencolor(color1)t.fillcolor(color2)t.pendown()t.begin_fill()a = 0.3for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a += lt.lt(3)t.fd(a)else:a -= lt.lt(3)t.fd(a)t.penup()t.end_fill()def mlingrotate_left(chishu, angle, length):for i in range(chishu):t.left(angle)t.forward(length)def mlingrotate_right(chishu, angle, length):for i in range(chishu):t.right(angle)t.forward(length)def llaeebeye():# AdversityAwaket.seth(22)mlingpen(80, 62)t.pensize(3)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.circle(40, 62)t.circle(21, 160)t.circle(40, 53)t.goto(80, 62)t.end_fill()t.seth(20)mlingpen(80, 62)t.pensize(2)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.circle(35, 62)t.circle(20, 164)t.circle(40, 53)t.goto(80, 62)t.end_fill()t.seth(30)mlingpen(76, 65)t.pensize(3)t.pencolor("#452b14")t.fillcolor('#e58f59')t.begin_fill()t.circle(31, 90)t.lt(12)t.circle(12, 70)t.lt(27)t.circle(40, 68)t.goto(76, 65)t.end_fill()t.seth(0)mlingpen(66, 72)t.pensize(1)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.circle(20, 120)t.circle(10, 120)t.lt(6)t.circle(40, 40)t.goto(66, 72)t.end_fill()t.seth(0)mlingpen(68, 75)t.pencolor("#373331")t.fillcolor('#3f3a38')t.begin_fill()t.circle(5, 360)t.end_fill()t.seth(0)mlingpen(73, 102)t.pensize(1)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.circle(6, 360)t.end_fill()# AdversityAwaket.seth(40)mlingpen(10, 70)t.pensize(3)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.circle(30, 170)t.circle(23, 120)t.goto(10, 70)t.end_fill()t.seth(44)mlingpen(10, 70)t.pensize(2)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.circle(29, 170)t.circle(23, 100)t.goto(10, 70)t.end_fill()t.seth(30)mlingpen(0, 75)t.pensize(3)t.pencolor("#452b14")t.fillcolor('#e58f59')t.begin_fill()t.circle(23, 280)t.goto(0, 75)t.end_fill()t.seth(30)mlingpen(-3, 82)t.pensize(3)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.circle(15, 360)t.goto(-3, 82)t.end_fill()t.seth(0)mlingpen(-11, 82)t.pencolor("#373331")t.fillcolor('#3f3a38')t.begin_fill()t.circle(5, 360)t.end_fill()t.seth(0)mlingpen(-6, 102)t.pensize(1)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.circle(6, 360)t.end_fill()def llaeebmeim():t.seth(100)mlingpen(-30, 125)t.pensize(2)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.goto(25, 133)t.circle(10, 100)t.rt(30)t.circle(50, 60)t.goto(-30, 125)t.end_fill()# AdversityAwaket.seth(120)mlingpen(60, 130)t.pensize(2)t.pencolor("#000000")t.fillcolor('#000000')t.begin_fill()t.goto(106, 130)t.circle(30, 40)t.circle(25, 80)t.goto(60, 130)t.end_fill()def llaeebmouse():# AdversityAwaket.seth(-30)mlingpen(0, 55)t.pensize(3)t.pencolor("#000000")# t.begin_fill()t.circle(130, 16)t.circle(48, 40)# t.end_fill()def llaeebbozi():# AdversityAwaket.seth(120)mlingpen(145, 40)t.pensize(3)t.pencolor("#000000")t.fillcolor('#805d57')t.begin_fill()t.circle(12, 120)t.rt(30)t.circle(55, 17)t.rt(10)t.circle(-110, 70)t.circle(100, 50)t.circle(50, 45)t.goto(-140, -210)t.goto(110, -210)t.lt(120)t.circle(100, 60)t.goto(145, 40)t.end_fill()def llaeebyifu():t.seth(160)mlingpen(-70, 140)t.pencolor("#624655")t.pensize(6)t.circle(170, 20)t.circle(30, 95)t.dot(15, "#624655")t.seth(-100)mlingpen(-70, 140)t.circle(-30, 130)t.dot(15, "#624655")t.seth(-180)mlingpen(-70, 140)t.circle(30, 50)t.circle(-190, 20)t.circle(190, 20)t.circle(-30, 50)t.dot(15, "#624655")t.seth(190)mlingpen(-70, 140)t.circle(-250, 20)t.circle(250, 10)t.circle(-30, 50)t.dot(15, "#624655")# AdversityAwaket.seth(0)mlingpen(-140, -210)t.pensize(3)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.goto(110, -210)t.circle(100, 60)t.lt(20)t.circle(50, 20)t.circle(-50, 30)t.circle(80, 60)t.goto(100, 140)t.rt(20)t.circle(80, 60)t.circle(100, 60)t.circle(190, 10)t.rt(15)t.circle(290, 55)t.goto(-140, -210)t.end_fill()def llaeebhand():t.seth(0)mlingpen(195, -165)t.pensize(3)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.lt(75)t.circle(50, 20)t.circle(-50, 30)t.circle(80, 60)t.goto(150, 40)t.lt(130)t.circle(-100, 70)t.goto(20, -40)t.lt(105)t.circle(200, 60)t.goto(195, -165)t.end_fill()t.seth(0)mlingpen(190, -160)t.pensize(2)t.pencolor("#eee7f1")t.fillcolor('#eee7f1')t.begin_fill()t.lt(75)t.circle(50, 20)t.circle(-50, 30)t.circle(80, 60)t.goto(147, 25)t.lt(130)t.circle(-100, 20)t.end_fill()t.seth(0)mlingpen(185, -160)t.pensize(2)t.pencolor("#faf4fc")t.fillcolor('#faf4fc')t.begin_fill()t.lt(75)t.circle(50, 20)t.circle(-50, 30)t.circle(75, 55)t.goto(145, 21)t.lt(130)t.circle(-95, 30)t.end_fill()t.seth(0)mlingpen(185, -160)t.pensize(2)t.pencolor("#fdfafe")t.fillcolor('#fdfafe')t.begin_fill()t.lt(75)t.circle(45, 20)t.circle(-45, 30)t.circle(65, 55)t.goto(143, 13)t.lt(130)t.circle(-95, 30)t.end_fill()# AdversityAwaket.seth(-80)mlingpen(-127.85, 12.90)t.pensize(3)t.pencolor("#000000")t.fillcolor('#ffffff')t.begin_fill()t.circle(46, 55)t.lt(60)t.circle(-30, 40)t.lt(10)t.circle(-150, 30)t.goto(20, -40)t.goto(110, -5)t.circle(-8, 80)t.lt(2)t.circle(-280, 55)t.goto(-140, -210)t.rt(89)t.circle(-300, 48)t.goto(-127.85, 12.90)t.end_fill()t.seth(-120)mlingpen(-101.00, -20.80)t.circle(90, 32)t.lt(120)t.circle(-80, 50)t.circle(66, 60)mlingpen(40, -80)mlingellipse(40, -80, 46, 0.06, 3, "#911a2b", "#dd4159")mlingellipse(52, -66, 45, 0.01, 3, "#911a2b", "#ffffff")mlingpen(45, -74)t.dot(9, "#ffffff")mlingpen(46, -60)t.dot(9, "#ffffff")mlingpen(56, -48)t.dot(9, "#ffffff")mlingpen(72, -46)t.dot(9, "#ffffff")mlingpen(59, -75)t.dot(9, "#ffffff")mlingpen(73, -64)t.dot(9, "#ffffff")t.pensize(3)t.pencolor("#911a2b")t.fillcolor('#dd4159')t.begin_fill()mlingpen(10, -100)t.goto(20, -100)t.lt(90)t.fd(20)t.lt(135)t.fd(10)t.goto(10, -100)t.end_fill()t.pensize(10)mlingpen(100, -80)t.goto(110, -85)t.pensize(3)mlingpen(-50, -35)t.goto(-20, -45)t.pencolor("#000000")t.pencolor("#fdfafe")
mlingpen(290, 75)
t.write("吉\n祥\n物\n", align="center", font=("楷体", 18, "normal"))
t.up()def llaeebtoumao():t.seth(0)mlingpen(105, 135)t.pensize(3)t.pencolor("#000000")t.fillcolor('#624655')t.begin_fill()t.circle(10, 155)t.rt(90)t.circle(8, 90)t.lt(8)t.circle(270, 38)t.lt(5)t.circle(8, 100)t.rt(90)t.circle(10, 100)t.lt(110)t.circle(-20, 50)t.circle(-270, 18)t.lt(5)t.circle(-250, 18)t.goto(105, 135)t.end_fill()if __name__ == '__main__':llaeebyifu()llaeebbozi()llaeebhand()llaeebtoumao()llaeebmouse()llaeebmeim()llaeebeye()t.done()

完毕!!感谢您的收看

----------★★历史博文集合★★----------
我的零基础Python教程,Python入门篇 进阶篇 视频教程 Py安装py项目 Python模块 Python爬虫 Json Xpath 正则表达式 Selenium Etree CssGui程序开发 Tkinter Pyqt5 列表元组字典数据可视化 matplotlib 词云图 Pyecharts 海龟画图 Pandas Bug处理 电脑小知识office自动化办公 编程工具
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/623782.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

领域驱动设计解决汉诺塔问题-文风批评(1)

DDD领域驱动设计批评文集 做强化自测题获得“软件方法建模师”称号 《软件方法》各章合集 以下文章内容纯属虚构&#xff0c;用来批评某些领域驱动设计文风。后续将挑一些近期的文章作为例子来批评。 ********** 领域驱动设计是革命性的创新&#xff0c;是划时代的洞见。领…

OpenCV-Python(40):光流算法

目标 光流的概念以及Lucas-Kanade 光流法使用函数cv2.calcOpticalFlowPyrLK() 对图像中的特征点进行跟踪 光流 介绍 由于目标对象或者摄像机的移动造成的图像对象在连续两帧图像中的移动被称为光流。它是一个2D 向量场&#xff0c;可以用来显示一个点从第一帧图像到第二帧图像…

CLion、IDEA设置编码为utf-8,防乱码

其实只要是JetBrains的软件都是通用的&#xff0c;下面以IDEA为例 1.设置项目文件编码 2.设置控制台的字符编码

bash shell基础命令

1.shell启动 shell提供了对Linux系统的交互式访问&#xff0c;通常在用户登录终端时启动。系统启动的shell程序取决于用户账户的配置。 /etc/passwd/文件包含了所有用户的基本信息配置&#xff0c; $ cat /etc/passwd root:x:0:0:root:/root:/bin/bash ...例如上述root账户信…

【外汇天眼】误入假冒Ctrl Investments无法出金,投资者:太相信网友了!

在当下这个互联网迅速发展的时代&#xff0c;各类交友类APP成为人们拓展社交圈的新渠道。一方面这样的交友软件在满足了用户基础的社交要求&#xff0c;另一方面网络世界所交往的朋友能给用户带来的神秘感和新鲜感&#xff0c;所以导致一部分年轻人离不开这些交友软件。然而&am…

Python 两种多值参数

有时可能需要一个函数中处理的参数的个数是不确定的&#xff0c;就需要使用多值参数 参数名前加上*&#xff0c;代表可以接收元组参数名前加上**&#xff0c;代表可以接收字典 代码&#xff1a; def demo(*args, **kwargs):print(args)print(kwargs)demo(1, 2, 3, 4, 5, nam…

两个数组的交集 II

题目链接 两个数组的交集 II 题目描述 注意点 返回结果中每个元素出现的次数&#xff0c;应与元素在两个数组中都出现的次数一致&#xff08;如果出现次数不一致&#xff0c;则考虑取较小值&#xff09;可以不考虑输出结果的顺序 解答思路 使用哈希表存储nums1中的元素及出…

“语言服务40人论坛2023年年会”在北京举行

为充分发挥区域合作优势&#xff0c;深度推进翻译专业学位研究生培养模式和路径建设&#xff0c;提升翻译人才培养质量&#xff0c;推动京津冀地区教育协同发展&#xff0c;为中国高质量发展提供语言服务智慧和方案&#xff0c;1月13日至14日&#xff0c;“语言服务40人论坛202…

2.IHRM人力资源 - 登录

一、登录页结构与表单开发 我们要实现的登录界面 目前的登录界面 1.1 登录页结构 复制下面的代码到views/login/index.vue页面下 <template><div class"login-container"><div class"logo"/><div class"form"><h1&…

CANFD数据记录仪在新能源汽车复杂路测下的应用

CANFD数据记录仪在新能源汽车复杂路测下的应用 汽车制造商在生产预批量阶段的耐久性测试中,为了检测潜在故障,必须让车辆在严酷的路况和环境下接受测试。为确保能回溯故障发生的现场情况,我们需要对测试数据精准记录与储存。这些数据是新车型优化迭代的关键,也是确保产品质量的…

【2023我的编程之旅】系统学习C语言easyx图形库心得体会

目录 引言 C语言基础知识回顾 easyx图形库介绍 如何快速学习easyx图形库 学习笔记积累 学习成果展示 学习拓展 总结 引言 首先说一下我为什么要学习C语言easyx图形库。我接触C语言easyx图形库是在我今年一月份的时候&#xff0c;也是机缘巧合之下偶然在B站上看到了鸣人…

C++力扣题目669--修剪二叉搜索树

给你二叉搜索树的根节点 root &#xff0c;同时给定最小边界low 和最大边界 high。通过修剪二叉搜索树&#xff0c;使得所有节点的值在[low, high]中。修剪树 不应该 改变保留在树中的元素的相对结构 (即&#xff0c;如果没有被移除&#xff0c;原有的父代子代关系都应当保留)。…

Win10不用U盘重装系统教程

在Win10电脑中&#xff0c;用户想重装电脑系统&#xff0c;但是自己没有U盘&#xff0c;想知道不用U盘要怎么完成Win10系统的重装&#xff1f;接下来小编给大家介绍Win10系统不用U盘重装的步骤&#xff0c;帮助大家轻轻松松完成系统Win10的重新安装&#xff0c;体验Win10系统的…

CF1446C Xor Tree 题解 DP Trie树

Xor Tree 传送门 题面翻译 给定你一个非负整数序列 a a a&#xff0c;保证其中每个数两两不同。 对于每个 a i a _ i ai​&#xff0c;它会向 j ≠ i j \ne i ji 且 a i ⊕ a j a_i\oplus a_j ai​⊕aj​&#xff08; ⊕ \oplus ⊕ 代表异或&#xff09;最小的 a j a…

React18-树形菜单-递归

文章目录 案例分析技巧通信展示效果实现代码技巧点技巧点 Refer to 案例分析 https://github.com/dL-hx/manager-fe/commit/85faf3b1ae9a925513583feb02b9a1c87fb462f7 从接口获取城市数据,渲染出一个树形菜单 要求: 可以展开和收起 技巧 学会递归渲染出一个树形菜单, 并点击后…

gramine运行nodejs例程

首先&#xff0c; 修改js例程代码&#xff1a; const { Web3 } require(web3); const rpcURL "https://sepolia.infura.io/v3/40b89bc0f5584056b19626b521ee5874"; const web3 new Web3(rpcURL); const address "0xde51E698b4585Af1C8322cc084ABbdbDcfe533…

C++力扣题目450--删除二叉搜索树中的节点

给定一个二叉搜索树的根节点 root 和一个值 key&#xff0c;删除二叉搜索树中的 key 对应的节点&#xff0c;并保证二叉搜索树的性质不变。返回二叉搜索树&#xff08;有可能被更新&#xff09;的根节点的引用。 一般来说&#xff0c;删除节点可分为两个步骤&#xff1a; 首先…

Generalized Focal Loss论文个人理解

论文地址&#xff1a;Generalized Focal Loss: Towards Efficient Representation Learning for Dense Object Detection 论文解决问题 研究人员最近更加关注边界框的表示(representation)及其定位质量估计&#xff08;LQE&#xff0c;本论文中指的是IoU score&#xff09;&a…

MtimeMtimecmp

Mtime: 实时time计数器&#xff0c;可读可写&#xff1b;mtime必须按照一个固定的频率递增&#xff1b;如果count overflow了&#xff0c;则mtime的值需要卷绕&#xff1b;对于32/64的系统来说&#xff0c;mtime的值都是64bits的&#xff1b; 与mtime对应的&#xff0c;还有一…

项目中使用iframe引入html 解决路由错乱问题以及父子组件传值调用方法

iframe与外部之间传值 父组件 <iframeid"iframe"src"luckysheet/index.html"frameborder"0"scrolling"no"style"width: 100%; height: 60vh; border: 0"/>const frame document.getElementById(iframe);frame.onloa…