【Turtle系列】端正心态正确面对疫情,守护安全防线不放松,共抗疫情,只待春来~

本文主要是介绍【Turtle系列】端正心态正确面对疫情,守护安全防线不放松,共抗疫情,只待春来~,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

前言

​​​​​​​​

今年3月份,​一场突如其来的“疫战”又一次打响。

在严峻的疫情之下,相信每个人也并未放松。面对疫情,足不出户,抗击疫情,不外出不聚

集,自觉为国家做贡献……宅在家要宅出健康,要宅出态度,宅出花样也要宅出精气神!接下来

跟小编一起为自己的家乡加油吧!

正文

这篇文章是绘制疫情期间,大家一起加油的画面!一方有难八方支援,全国人一起团结抗战,

只是绘制了部分的!

代码展示:

​
import turtle as t
import randomdef wheregoto(x,y): #x,y表示坐标t.up()t.goto(x,y)t.down()t.speed(0)
t.penize(4)
t.screensize(690,764) #设置画布
t.pensize(4)
wheregoto(-325,352)
t.setheading(270)
t.pencolor("gray1")
for j in range (2):t.forward(734)t.left(90)t.forward(650)t.left(90)
t.pencolor("red3")
t.penup()#枕头
t.speed(0)
t.fillcolor("mint cream")
t.setheading(180)
wheregoto(-86,-22)
t.begin_fill()
t.penown()
t.left(-10)
t.circle(160,12)
t.left(-41)
t.circle(60,10)
t.left(70)
t.circle(60,10)
t.left(40)
t.circle(200,8)
t.left(-8)
t.circle(200,4)
t.left(-18)
t.circle(200,4)
t.right(10)
t.circle(200,4)
t.left(10)
t.circle(200,4)
t.left(10)
t.circle(200,4)
t.left(10)
t.circle(200,3)
t.right(15)
t.circle(200,3)
t.right(25)
t.circle(200,3)
t.left(55)
t.circle(200,3)
t.left(25)
t.circle(200,14)
t.fd(150)
t.setheading(-5)
t.pendown()
t.circle(200,8)
t.right(40)
t.circle(200,2)
t.left(30)
t.circle(200,3)
t.left(20)
t.circle(200,2)
t.left(45)
t.circle(70,40)
t.right(30)
t.circle(200,17)
t.right(20)
t.circle(200,3)
t.left(10)
t.circle(200,3)
t.left(20)
t.circle(200,3)
t.left(20)
t.circle(60,3)
t.left(60)
t.circle(60,5)
t.left(20)
t.circle(60,5)
t.right(50)
t.circle(300,9)
t.seth(176)
t.fd(168)
t.end_fill()#杯子
t.setheading(0)
wheregoto(-100,90)
t.fillcolor("floral white")
t.begin_fill()
t.left(-80)
t.forward(160)
t.left(30)
t.circle(100,95)
t.left(35)
t.forward(163)
t.end_fill()
t.fillcolor("khaki1")
t.begin_fill()
t.left(57)
t.circle(150,85)
t.left(103)
t.circle(180,68)
t.end_fill()#面
#面底色
wheregoto(-86,81)
t.pencolor("red3")
t.fillcolor("khaki")
t.begin_fill()
t.setheading(56)
t.circle(-103,114)
t.pensize(2)
t.setheading(212)
t.circle(-154,70)
t.end_fill()#大面
wheregoto(-76,78)
t.pencolor("Darkgoldenrod3")
t.setheading(36)
t.pensize(4)
t.circle(-140,70)
wheregoto(-76,90)#面条1
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.pensize(4)
t.circle(-160,50)
wheregoto(-54,110)#2
t.pencolor("Darkgoldenrod3")
t.setheading(18)
t.pensize(4)
t.circle(-150,50)
wheregoto(-36,115)#3
t.pencolor("Darkgoldenrod3")
t.setheading(19)
t.pensize(4)
t.circle(-90,60)
wheregoto(-36,115)#4
t.pencolor("Darkgoldenrod3")
t.setheading(24)
t.pensize(4)
t.circle(-90,60)
wheregoto(-66,75)#5
t.pencolor("Darkgoldenrod3")
t.setheading(41)
t.circle(-90,90)
wheregoto(-10,103)#6
t.pencolor("Darkgoldenrod3")
t.setheading(0)
t.circle(-110,47)
wheregoto(-10,103)#7
t.pencolor("Darkgoldenrod3")
t.setheading(0)
t.circle(-150,37)#小面
t.pensize(5)
t.pencolor("red3")
wheregoto(-63,71)
t.setheading(39)
t.circle(-110,30)
t.setheading(10)
t.circle(-56,76)
wheregoto(-63,71)#面条1
t.pencolor("Darkgoldenrod3")
t.setheading(34)
t.circle(-110,30)
t.setheading(10)
t.circle(-56,72)
wheregoto(-54,67)#2
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,24)
t.setheading(6)
t.circle(-56,61)
wheregoto(-42,63)#3
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,20)
t.setheading(6)
t.circle(-56,52)
wheregoto(-28,60)#4
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,16)
t.setheading(6)
t.circle(-56,48)
wheregoto(-15,56)#5
t.pencolor("Darkgoldenrod3")
t.setheading(32)
t.circle(-130,14)
t.setheading(6)
t.circle(-40,48)
wheregoto(-1,56)#6
t.pencolor("Darkgoldenrod3")
t.setheading(34)
t.circle(-120,9)
t.setheading(6)
t.circle(-30,48)
wheregoto(13,56)#7
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-120,9)
t.setheading(6)
t.circle(-10,60)#面轮廓
wheregoto(-86,81)
t.pencolor("red3")
t.setheading(56)
t.circle(-103,114)
t.pensize(4)
t.setheading(212)
t.circle(-154,70)#酱汁
wheregoto(-34,110)
t.pensize(3)
t.pendown()
t.pencolor("orange4")
t.fillcolor("orange4")
t.begin_fill()
t.setheading(56)
t.circle(-40,50)
t.setheading(26)
t.circle(-40,70)
t.setheading(-15)
t.circle(-70,30)
t.circle(-30,30)
t.circle(-10,30)
t.circle(-10,100)
t.circle(-190,10)
t.circle(-5,360)
t.seth(-170)
t.circle(-180,20)
t.seth(145)
t.circle(-30,50)
t.end_fill()
t.penup()wheregoto(55,75)
t.begin_fill()
t.circle(3,360)
t.end_fill()wheregoto(40,90)
t.begin_fill()
t.circle(5,360)
t.end_fill()wheregoto(-45,95)
t.begin_fill()
t.circle(2,360)
t.end_fill()#葱
t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto

这篇关于【Turtle系列】端正心态正确面对疫情,守护安全防线不放松,共抗疫情,只待春来~的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/774730

相关文章

Java中常见队列举例详解(非线程安全)

《Java中常见队列举例详解(非线程安全)》队列用于模拟队列这种数据结构,队列通常是指先进先出的容器,:本文主要介绍Java中常见队列(非线程安全)的相关资料,文中通过代码介绍的非常详细,需要的朋... 目录一.队列定义 二.常见接口 三.常见实现类3.1 ArrayDeque3.1.1 实现原理3.1.2

linux lvm快照的正确mount挂载实现方式

《linuxlvm快照的正确mount挂载实现方式》:本文主要介绍linuxlvm快照的正确mount挂载实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux lvm快照的正确mount挂载1. 检查快照是否正确创建www.chinasem.cn2.

Python使用Turtle实现精确计时工具

《Python使用Turtle实现精确计时工具》这篇文章主要为大家详细介绍了Python如何使用Turtle实现精确计时工具,文中的示例代码讲解详细,具有一定的借鉴价值,有需要的小伙伴可以参考一下... 目录功能特点使用方法程序架构设计代码详解窗口和画笔创建时间和状态显示更新计时器控制逻辑计时器重置功能事件

将图片导入Python的turtle库的详细过程

《将图片导入Python的turtle库的详细过程》在Python编程的世界里,turtle库以其简单易用、图形化交互的特点,深受初学者喜爱,随着项目的复杂度增加,仅仅依靠线条和颜色来绘制图形可能已经... 目录开篇引言正文剖析1. 理解基础:Turtle库的工作原理2. 图片格式与支持3. 实现步骤详解第

JAVA保证HashMap线程安全的几种方式

《JAVA保证HashMap线程安全的几种方式》HashMap是线程不安全的,这意味着如果多个线程并发地访问和修改同一个HashMap实例,可能会导致数据不一致和其他线程安全问题,本文主要介绍了JAV... 目录1. 使用 Collections.synchronizedMap2. 使用 Concurren

Python从零打造高安全密码管理器

《Python从零打造高安全密码管理器》在数字化时代,每人平均需要管理近百个账号密码,本文将带大家深入剖析一个基于Python的高安全性密码管理器实现方案,感兴趣的小伙伴可以参考一下... 目录一、前言:为什么我们需要专属密码管理器二、系统架构设计2.1 安全加密体系2.2 密码强度策略三、核心功能实现详解

最新Spring Security实战教程之Spring Security安全框架指南

《最新SpringSecurity实战教程之SpringSecurity安全框架指南》SpringSecurity是Spring生态系统中的核心组件,提供认证、授权和防护机制,以保护应用免受各种安... 目录前言什么是Spring Security?同类框架对比Spring Security典型应用场景传统

Spring Boot 中正确地在异步线程中使用 HttpServletRequest的方法

《SpringBoot中正确地在异步线程中使用HttpServletRequest的方法》文章讨论了在SpringBoot中如何在异步线程中正确使用HttpServletRequest的问题,... 目录前言一、问题的来源:为什么异步线程中无法访问 HttpServletRequest?1. 请求上下文与线

浅析Rust多线程中如何安全的使用变量

《浅析Rust多线程中如何安全的使用变量》这篇文章主要为大家详细介绍了Rust如何在线程的闭包中安全的使用变量,包括共享变量和修改变量,文中的示例代码讲解详细,有需要的小伙伴可以参考下... 目录1. 向线程传递变量2. 多线程共享变量引用3. 多线程中修改变量4. 总结在Rust语言中,一个既引人入胜又可

golang1.23版本之前 Timer Reset方法无法正确使用

《golang1.23版本之前TimerReset方法无法正确使用》在Go1.23之前,使用`time.Reset`函数时需要先调用`Stop`并明确从timer的channel中抽取出东西,以避... 目录golang1.23 之前 Reset ​到底有什么问题golang1.23 之前到底应该如何正确的