​草莓熊python 绘图(春节版,圣诞倒数雪花版)附源代码

本文目录:

一、前言

二、​草莓熊python绘图(圣诞倒数雪花版)、(春节版)效果图

三、源代码保存方法

四、代码命令解释

(1)、绘图基本代码语法解释

(2)、7段数码管详解

(2.1)、7段数码管的显示方式图解

(2.2)、绘制数码管单个数字的方法

(2.3)、按七段数码管形式格式化输出日期数据

(3)、倒计时实现方法

(4)、随机绘制雪花

五、相关资源下载

六、运行python turtle绘图代码(本机运行、打包发给别人)

七、逆境清醒草莓熊(圣诞元旦倒数雪花版)源代码

八、逆境清醒草莓熊(春节版)源代码


一、前言

  今天是2022年12月19日,过几天就是圣诞节了,这次我画的草莓熊是一手捧礼物盒,一手持玫瑰花的特别版,圣诞节想送礼物逗朋友开心的可以留意一下。

  新添加了春节版,所有资源(包括背景图片)都可在文中下载。想送草莓熊春节版逗朋友开心的可以留意一下。

  请记住,不要从其他地方下载和购买我的绘图代码(包括可执行的exe文件,小心代码被篡改有病毒) 。我只有一个博客,就是CSDN的,逆境清醒的博客: https://blog.csdn.net/weixin_69553582

  我(逆境清醒)博客中的代码是完整源代码,你从我博客拷贝代码后本机运行就能看到和我博客上同样的运行效果(只要我网络没有被全h)。

  我乐意分享,不需要你去关注任何账号,不强求任何人成为我的粉丝,也不需要你以任何形式购买源代码,只要你是个人学习用,或者通过我的代码能带给你身边的朋友开心快乐,我愿意为此尽一分力。

  我是奶奶级别的姐姐,粉丝数量多少对我来说没多大吸引力,如果有缘,天晴后,我们可以像平等的朋友一样在网上聊聊天我一直很喜欢一句话:你S了,谁会真心哭?那些真心为你掉眼泪的人,才是你来到这个世界上真正收获得到的东西。

  如果你将草莓熊python动画送给你朋友时,他(她)喜欢,请在心里悄悄告诉我一声,让我也跟着开心一下。生活不易,我希望自己的努力和付出能带给别人真正的开心和快乐!虽然你我并不认识,虽然逆境清醒已经很笨,但我还是选择坚持做个单纯善良的人。

二、​草莓熊python绘图(圣诞倒数雪花版)、(春节版)效果图

  圣诞元旦版添加了随机雪花,下图是300朵雪花的效果图:

  下图是100朵雪花的效果图:

春节版效果图:

三、源代码保存方法

  将源代码完整拷贝,保存成:你的文件名.py ,(记得保存时文件编码格式选UTF-8,保存类型选所有文件(*.*),后缀一定要用.py)。例如:cmx.py 然后在python环境下运行。你会看到和我一样的《草莓熊圣诞元旦版》效果。

四、代码命令解释

(1)、绘图基本代码语法解释

  python turtle绘图基本代码的语法解释部分,可点击查看文章里的介绍:草莓熊python turtle绘图(风车版)附源代码

(2)、7段数码管详解

(2.1)、7段数码管的显示方式图解

  本例中,用到了时间倒数,数字的显示方法模仿的是7段数码管的显示方式:

  如图所示,七段数码管由七个线条组成,可以有固定顺序(1--7),不同数字显示不同的线条

(2.2)、绘制数码管单个数字的方法

def drawLine(draw):  # 绘制某单段(行或列)数码管的函数
    t.pd() if draw else t.pu()  # 如果有就落笔,没有就抬笔
    t.fd(10)  # 向前绘制10
    t.right(90)   # 顺时针转90度

def draw7Dight(dight): #根据数字绘制七段数码管
    drawLine(True) if dight in [2, 3, 4, 5, 6, 8, 9] else drawLine(False) #判断第1段数码管(如果数字为2, 3, 4, 5, 6, 8, 9中的一个则需要落笔绘制)
    drawLine(True) if dight in [0, 1, 3, 4, 5, 6, 7, 8, 9] else drawLine(False) #判断第2段数码管,(如果数字为0, 1, 3, 4, 5, 6, 7, 8, 9中的一个则需要落笔绘制)
    drawLine(True) if dight in [0, 2, 3, 5, 6, 8, 9] else drawLine(False) #判断第3段数码管(如果数字为0, 2, 3, 5, 6, 8, 9中的一个则需要落笔绘制)
    drawLine(True) if dight in [0, 2, 6, 8] else drawLine(False) #判断第4段数码管,(如果数字为0, 2, 6, 8中的一个则需要落笔绘制)
    t.left(90) #走完1234段数码管,到第5段时需直走,在原来right90的基础上恢复过来就left90
    drawLine(True) if dight in [0, 4, 5, 6, 8, 9] else drawLine(False) #判断第5段数码管(如果数字为0, 4, 5, 6, 8, 9则需要落笔绘制)
    drawLine(True) if dight in [0, 2, 3, 5, 6, 7, 8, 9] else drawLine(False) #判断第6段数码管,(如果数字为0, 2, 3, 5, 6, 7, 8, 9则需要落笔绘制)
    drawLine(True) if dight in [0, 1, 2, 3, 4, 7, 8, 9] else drawLine(False) #判断第7段数码管,(如果数字为0, 1, 2, 3, 4, 7, 8, 9则需要落笔绘制)
    t.right(180) # 调整方向,让下一个绘制回归原点
    t.penup() # 抬笔,停止绘制
    t.fd(20) # 前进20,为后续数字确定绘制位置

(2.3)、按七段数码管形式格式化输出日期数据

def draw7DightDate(date): # 将取得的日期数据按七段数码管的形式处理显示
    t.pencolor("red")
    for i in date:
        if i == '-': #按分隔符处理年
            t.write('年', font=("黑体", 12, "normal"))
            #t.pencolor("green")
            t.fd(40)
        elif i == '=': #按分隔符处理月
            t.write('月', font=("黑体", 12, "normal"))
            #t.pencolor("blue")
            t.fd(40)
        elif i == '+': #按分隔符处理日
            t.write('日', font=("黑体", 12, "normal"))
            t.pencolor("red")
            t.fd(40)
        elif i == '/': #按分隔符处理时
            t.write('时', font=("黑体", 12, "normal"))
            #t.pencolor("green")
            t.fd(40)
        elif i == '*': #按分隔符处理分
            t.write('分', font=("黑体", 12, "normal"))
            #t.pencolor("blue")
            t.fd(40)
        elif i == '.': #按分隔符处理秒
            t.write('秒', font=("黑体", 12, "normal"))
            t.fd(40)
        else: #绘制数码管数字
            draw7Dight(eval(i))

(3)、倒计时实现方法

思路:取得系统时间,再减去设定的时间,所得的就是倒计时需要的剩余时间

时间用到了datetime函数,需要预先导入:import datetime

获取当前的日期:

today = datetime.datetime.now()  # 获取当前的日期

设定的时间:例如元旦

springdate = datetime.datetime(2022, 12, 31)

设定的时间:例如春节

springdate1 = datetime.datetime(2023,1,22)

计算现在距离元旦还有多少天(除去今天外):

day = (springdate - today).days # 元旦日期减去当前日期

计算现在距离春节还有多少天(除去今天外):

day1 = (springdate1 - today).days  # 新年日期减去当前日期

(4)、随机绘制雪花

  随机绘制用到了random函数,需要预先导入:

  import random

t.pensize(1)
for j in range(100): 
    x = random.randint(-400, 400)
    y = random.randint(-300,300)
    dx = random.randint(1,10)
    for i in range(6):
        t.penup()
        t.goto(x, y)
        t.pendown()
        t.pencolor('white')
        t.forward(dx)
        t.left(60)
        t.circle(2)
        t.goto(x, y)

  代码中,for j in range(100): 这句里面的数字100就是需要python  turtle海龟绘制雪花的个数,数字越大,雪花越多,相应的绘图时间也会越长。前文效果图中,有两幅对比图,分别是300朵雪花和100朵雪花的效果图,可以按自己需要修改参数。

  记得发给朋友时不要设定下太大雪呀,就算你所在地正在下天崩级别的大雪,你也不可以同样定制,因为所绘制的雪花不会消融,只会堆积在那里。你。。。你会用人造雪把草莓熊给活埋了!!!草莓熊就不能把祝福带给你朋友了。。。

五、相关资源下载

(1)、色彩颜色对照表(300种颜色)(16进制、RGB、CMYK、HSV、中英文名)

(2)、我自己设计制作的草莓熊圣诞节底图,喜欢的可以下载搭配上

  记得保存时将文件名设为:cmx4_di1.gif,

  并将代码里23行:#t.bgpic("cmx4_di1.gif") 这句前面的 符号去掉。

(3)、春节版底图资源:

草莓熊春节版底图,喜欢的可以下载搭配上,记得保存时将文件名设为:cmx4_di2.gif,

  并将代码里:#t.bgpic("cmx4_di2.gif") 这句前面的 符号去掉。

六、运行python turtle绘图代码(本机运行、打包发给别人)

怎么才能正常运行python turtle绘图代码
(1)本机运行绘图代码
(2)打包发给别人欣赏python动画
      (a)安装Pyinstaller
      (b)用Pyinstaller打包动画文件

Pyinstaller参数详解
(1)可选参数
(2)、与生成结果有关的参数
(3)、指定打包哪些资源、代码
(4)、生成参数
(5)、Windows 和 Mac OS X 特定选项
(6)、Windows特有的参数

  具体的详细介绍写在此文中,请点击查看:巴斯光年python turtle绘图__附源代码

七、逆境清醒草莓熊(圣诞元旦倒数雪花版)源代码

#-*- coding: UTF-8 -*-
import turtle as t
import datetime
import time
import math
import random"""
=================================================
@Project ->Adversity Awake 草莓熊系列
@类别     : 草莓熊->草莓熊之3
@Author  : 逆境清醒
@Date    : 2022/12/18 5:46
@Desc    :https://blog.csdn.net/weixin_69553582
=================================================
"""
# 设置背景颜色,窗口位置以及大小t.colormode(255)# 颜色模式
t.speed(0)
t.screensize(900,760,"#010812")#画布大小背景颜色
t.setup(width=900, height=760,startx=None, starty=None) #绘图窗口的大小和起始坐标
#t.bgpic("cmx4_di1.gif")
t.title("逆境清醒草莓熊!")#设置绘图窗口的标题
t.resizemode('noresize')  #大小调整模式:auto,user,noresize
t.tracer(1)   def mlingpen(x, y):t.penup()t.goto(x, y)t.pendown()def rose(): #roset.seth(90)mlingpen(-225, -60)t.pensize(10)t.pencolor("#035025")t.circle(300,30)mlingpen(-240, 70)t.pensize(2)t.color("#000000", "#22ac38")t.seth(12)mlingpen(-235,40)t.lt(40)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()mlingpen(-235,40)t.lt(330)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()mlingpen(-235,40)t.lt(260)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,60)  t.begin_fill()t.color("#000000", "#f8c0c8")t.circle(50,150)t.rt(20)t.fd(40)t.rt(40)t.circle(15,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#f5aab5", "#f5aab5")t.circle(34,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#f198a5", "#f198a5")t.circle(30,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#ee8998", "#ee8998")t.circle(20,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()mlingpen(-220,80)  t.begin_fill()t.color("#e56e7f", "#e56e7f")t.circle(15,200)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.seth(35)mlingpen(-230,90)  t.begin_fill()t.color("#000000", "#fda7b5")t.circle(50,50)t.rt(40)t.circle(25,200)t.up()t.end_fill()t.seth(130)mlingpen(-294.51,142.14)  t.begin_fill()t.color("#000000", "#fdadb8")t.circle(20,100)t.rt(90)t.circle(10,180)t.rt(90)t.circle(15,130)t.rt(110)t.circle(30,130)t.rt(50)t.circle(50,80)t.up()t.end_fill()t.seth(80)mlingpen(-240,140)  t.begin_fill()t.color("#000000", "#fe8e9e")t.circle(10,100)t.rt(90)t.circle(12,150)t.rt(90)t.circle(15,130)t.rt(50)t.circle(50,80)t.rt(10)t.circle(50,80)t.goto(-240,140)t.up()t.end_fill()t.seth(80)mlingpen(-250,140)  t.begin_fill()t.color("#f9788b", "#f9788b")t.circle(5,130)t.rt(90)t.circle(10,170)t.rt(100)t.circle(10,130)t.rt(70)t.circle(40,80)t.rt(40)t.circle(30,30)t.goto(-250,140)t.up()t.end_fill()t.seth(10)mlingpen(-245, 80)t.begin_fill()  t.color("#000000", "#ef5f7a")t.seth(35)t.circle(30,80)t.rt(80)t.circle(10,150)t.rt(80)t.circle(17,200)t.rt(60)t.circle(29,120)t.goto(-245, 80)t.up()t.end_fill()t.seth(10)mlingpen(-250, 85)t.begin_fill()  t.color("#ef758c", "#ef758c")t.seth(35)t.circle(25,80)t.rt(80)t.circle(6,150)t.rt(80)t.circle(12,210)t.rt(60)t.circle(23,120)t.goto(-250, 85)t.up()t.end_fill()t.seth(0)  mlingpen(-250,125)t.pensize(5)t.dot("#ff4969")t.pensize(2)mlingpen(-266.97,121.26)t.pencolor("#321320")t.fillcolor("#f04969")t.begin_fill()t.rt(80)t.circle(12,150)t.rt(80)t.circle(6,270)t.rt(150)t.circle(10,180)t.up()t.end_fill()#t.color("#000000", "#f04969")t.seth(-70)mlingpen(-210,100)  t.begin_fill()t.color("#000000", "#f04969")t.rt(20)t.fd(30)t.circle(-40,170)t.lt(20)t.fd(20) t.goto(-210,100)t.up()t.end_fill()t.seth(-70)mlingpen(-215,90)  t.begin_fill()t.color("#ee627d", "#ee627d")t.rt(20)t.fd(20)t.circle(-35,170)t.lt(20)t.fd(15)t.goto(-220,90)t.up()t.end_fill()t.seth(-70)mlingpen(-220,80)  t.begin_fill()t.color("#f47a91", "#f47a91")t.rt(20)t.fd(10)t.circle(-28,170)t.lt(20)t.fd(10)t.goto(-220,90)t.up()t.end_fill()t.seth(150)mlingpen(-220,100)  t.begin_fill()t.color("#000000", "#f7cad1")t.circle(20,80)t.rt(10)t.circle(-40,70)t.rt(10)t.circle(20,80)t.rt(5)t.circle(5,180)t.rt(80)t.circle(20,70)t.rt(80)t.circle(40,60)t.rt(10)t.circle(40,110)t.goto(-220,100) t.up()t.end_fill()t.seth(150)mlingpen(-220,98)  t.begin_fill()t.color("#ffe9f2", "#ffe9f2")t.circle(15,80)t.rt(7)t.circle(-45,75)t.rt(8)t.circle(20,50)t.rt(5)t.circle(2,200)t.rt(80)t.circle(15,85)t.rt(80)t.circle(40,60)t.rt(20)t.circle(30,70)t.goto(-220,98) t.up()t.end_fill()t.seth(150)mlingpen(-180,55)  t.begin_fill()t.color("#000000", "#f7cad1")t.circle(30,80)t.rt(10)t.circle(-60,70)t.rt(5)t.circle(30,80)t.rt(5)t.circle(5,180)t.rt(90)t.circle(30,80)t.rt(80)t.circle(40,70)t.circle(20,50)t.rt(90)t.circle(20,95)t.goto(-180,55)t.up()t.end_fill()t.seth(150)mlingpen(-190,50)  t.begin_fill()t.color("#f7e0e3", "#f7e0e3")t.circle(25,80)t.rt(8)t.circle(-55,75)t.rt(3)t.circle(25,60)t.rt(6)t.circle(5,200)t.rt(90)t.circle(30,80)t.rt(80)t.circle(22,80)t.circle(20,40)t.rt(80)t.circle(15,90)t.goto(-190,50)t.up()t.end_fill()mling_circle_list = iter([  # 每段弧线(半径,弧角度数)(18, 360), (14, 360), (10, 360), (6, 360),(18, 360), (14, 360), (10, 360), (6, 360),
])def mling_draw_eyeball(zb1,zb2,zb3,zb4):  for zb, color_ in zip([zb1,zb2,zb3,zb4], ['#ffffff', '#482d08', '#000000', '#ffffff']):t.penup()t.goto(*zb)t.pendown()t.begin_fill()t.setheading(0)t.color(color_)t.pencolor('#000000')t.pensize(2)t.circle(*next(mling_circle_list))t.end_fill()t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#cb3263")
t.pensize(4)
t.goto(120,110)
t.pendown()
t.begin_fill()
t.goto(200,0)
t.left(-40)
t.circle(-110,105)
t.left(75)
t.goto(170,-110)
t.left(-80)
t.circle(30,40)
t.left(60)
t.circle(-80,70)
t.left(83)
t.circle(-35,95)
t.goto(60,-270)
t.left(-80)
t.circle(-65,70)
t.left(63)
t.circle(35,30)
t.left(130)
t.circle(-65,70)
t.goto(-120,-270)
t.left(-110)
t.circle(-35,80)
t.left(83)
t.circle(-80,50)
t.left(60)
t.circle(-80,60)
t.left(60)
t.circle(30,30)
t.left(20)
t.circle(80,80)
t.left(-105)
t.circle(-70,150)
t.left(50)
t.circle(-170,50)
t.goto(120,110)
#Author:Adversity Awake
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#ffffff")
t.pensize(4)
t.goto(90,60)
t.pendown()
t.begin_fill()
t.right(30)
t.circle(-130,360)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#015426")
t.pensize(4)
t.goto(-250,-55)
t.dot("blue")
t.seth(0)
t.pendown()
t.begin_fill()
t.right(-55)
#t.circle(-45,270)
t.circle(-35,70)
t.goto(-200,-165)
t.goto(-250,-165)
t.goto(-220,-75)
t.goto(-250,-55)
t.end_fill()rose()t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#f3d2ad")
t.pensize(4)
t.goto(185,-90)
t.pendown()
t.begin_fill()
t.right(140)
t.circle(43,95)
t.goto(185,-90)
t.end_fill()
t.penup()
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#cb3263')
t.pensize(4)
t.begin_fill()
t.goto(21,0)
t.pendown()
t.circle(123,134)
t.left(-90)
t.circle(40,185)
t.left(-60)
t.circle(120,60)
t.left(-90)
t.circle(50,200)
t.left(-90)
t.circle(100,100)
t.left(-12)
t.circle(100,40)
t.goto(21,0)
t.penup()
#Author:Adversity Awake
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(-70,210)
t.left(140)
t.pendown()
t.circle(30,200)
t.goto(-70,210)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(90,220)
t.left(45)
t.pendown()
t.circle(22,200)
t.goto(90,220)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.left(-98)
t.left(90)
t.goto(18,10)
t.pendown()
t.circle(100,134)
t.left(10)
t.circle(110,30)
t.left(10)
t.circle(160,40)
t.circle(85,40)
t.left(2)
t.circle(95,40)
t.left(5)
t.circle(95,60)
t.goto(18,10)
t.penup()
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(25,240)
t.pendown()
t.begin_fill()
t.goto(60,235)
t.left(30)
t.fd(8)
t.left(90)
t.fd(22)
t.circle(90, 8)
t.left(20)
t.circle(90, 8)
t.left(20)
t.circle(90, 20)
t.left(40)
t.circle(50, 20)
t.end_fill()
t.penup()
t.pensize(12)
t.goto(-2,250)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.goto(60,240)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(-55,193)
t.pendown()
t.begin_fill()
t.left(65)
t.circle(-90, 25)
t.goto(-10,230)
t.left(30)
t.fd(8)
t.left(90)
t.fd(18)
t.circle(90, 8)
t.left(20)
t.circle(90, 10)
t.left(40)
t.circle(90, 30)
t.left(30)
t.circle(40, 20)
t.penup()
t.end_fill()
t.pensize(12)
t.goto(-63,195)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.left(100)
t.circle(-85,45)
t.end_fill()mling_draw_eyeball((-20,180), (-23,185), (-25,188), (-30,200))
mling_draw_eyeball((30, 193), (27, 200), (25,203), (20,213)) t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(3)
t.goto(25,105)
p = t.pos()
t.pendown()
t.begin_fill()
t.circle(85, 65)
t.left(16)
t.circle(30, 55)
t.left(20)
t.circle(145, 58)
t.left(8)
t.circle(20, 55)
t.left(8)
t.circle(50, 65)
t.left(-5)
t.circle(310, 8)
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#a93e54')
t.pensize(3)
t.begin_fill()
t.left(-20)
t.goto(9,66)
t.pendown()
t.circle(68,40)
t.left(10)
t.circle(65,40)
t.left(160)
t.circle(-75,85)
t.left(158)
t.circle(48,37)
t.goto(9,66)
t.penup()
t.end_fill()
t.color('#987824')
t.penup()
#t.goto(260,60)
#t.pendown()
mlingpen(260,60)
t.write("祝\n你\n节\n日\n快\n乐\n",align="center",font=("黑体",22,"normal"))
t.penup()
t.goto(300,195)
t.pendown()
t.write("逆\n境\n清\n醒\n",align="center",font=("黑体",15,"normal"))def liwuhe(): #liwuhe#AdversityAwaket.seth(-90)  t.pencolor('#ca7124')t.fillcolor('#fddeaf')t.pensize(3)mlingpen(266,-55)t.begin_fill()t.fd(130)t.rt(80)t.fd(80)t.rt(100)t.fd(132)t.rt(80)t.goto(266,-55)t.up()t.end_fill()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#f8b756')t.pensize(3)mlingpen(186,-70)t.begin_fill()t.fd(130)t.rt(110)t.fd(110)t.rt(70)t.fd(110)t.rt(80)t.goto(186,-70)t.up()t.end_fill()#AdversityAwaket.seth(0)t.pencolor('#ca7124')t.fillcolor('#e8a846')t.pensize(3)mlingpen(186,-35)t.begin_fill()t.lt(6)t.fd(86)t.lt(170)t.fd(90)t.goto(80,-23)t.goto(186,-35)t.end_fill()t.up()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#fce3b8')t.pensize(3)mlingpen(270,-25)t.begin_fill()t.fd(30)t.rt(80)t.fd(85)t.rt(105)t.fd(34)t.rt(80)t.goto(270,-25)t.end_fill()t.up()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#e8a846')t.pensize(3)mlingpen(186,-34)t.begin_fill()t.fd(34)t.rt(100)t.fd(110)t.rt(78)t.fd(30)t.rt(75)t.goto(186,-34)t.end_fill()t.up()#AdversityAwaket.seth(90)t.pencolor('#fe000b')t.fillcolor('#fe000b')t.pensize(20)mlingpen(130,-55)t.fd(26)t.rt(80)t.fd(90)t.bk(40)t.rt(25)t.fd(50)t.rt(80)t.goto(240,-60)t.dot(30,"white")mlingpen(170,-20)t.goto(130,10)t.goto(110,-10)t.goto(170,-20)mlingpen(170,-20)t.goto(230,15)t.goto(250,-10)t.goto(170,-20)t.up()t.dot(30,"white")mlingpen(190,-10)t.dot(30,"white")mlingpen(130,-55)t.dot(30,"white")liwuhe()def julispring(): #julichunjie#springdate = time.strftime(2023, 1, 22, 0, 0, 0)  # 新的一年的日期springdate = datetime.datetime(2023, 12, 31)springdate1 = datetime.datetime(2024,2,10)today = datetime.datetime.now()  # 获取当前的日期day = (springdate - today).days  # 元旦日期减去当前日期day1 = (springdate1 - today).days  # 新年日期减去当前日期mlingpen(-350,235)t.write('距离元旦还有:', font=("黑体", 12, "bold"))mlingpen(-220,245)for i in str(day):draw7Dight(eval(i))mlingpen(-133,220)t.write('天\n', font=("黑体", 12, "bold"))mlingpen(-350,200)t.write('距离春节还有:', font=("黑体", 12, "bold"))mlingpen(-220,205)for i in str(day1):draw7Dight(eval(i))mlingpen(-133,185)t.write('天\n', font=("黑体", 12, "bold"))def julishengdanjie(): #julishengdanjieshengdandate = datetime.datetime(2023, 12, 25, 0, 0, 0)  # 新的一年的日期today = datetime.datetime.now()  # 获取当前的日期day = (shengdandate - today).days  # 新年日期减去当前日期#print("离圣诞节还有" + str(day) + "天" + '\r')t.write('距离圣诞还有:', font=("黑体", 12, "bold"))mlingpen(-220,280)for i in str(day):draw7Dight(eval(i))mlingpen(-133,260)t.write('天\n', font=("黑体", 12, "bold"))# 数码管def drawLine(draw):#绘制某单段(行或列)数码管的函数t.pd() if draw else t.pu()#如果有就落笔,没有就抬笔t.fd(10)# 向前绘制10t.right(90)#顺时针转90度def draw7Dight(dight):#根据数字绘制七段数码管drawLine(True) if dight in [2, 3, 4, 5, 6, 8, 9] else drawLine(False) #判断第1段数码管(如果数字为2, 3, 4, 5, 6, 8, 9中的一个则需要落笔绘制)drawLine(True) if dight in [0, 1, 3, 4, 5, 6, 7, 8, 9] else drawLine(False) #判断第2段数码管,(如果数字为0, 1, 3, 4, 5, 6, 7, 8, 9中的一个则需要落笔绘制)drawLine(True) if dight in [0, 2, 3, 5, 6, 8, 9] else drawLine(False) #判断第3段数码管(如果数字为0, 2, 3, 5, 6, 8, 9中的一个则需要落笔绘制)drawLine(True) if dight in [0, 2, 6, 8] else drawLine(False) #判断第4段数码管,(如果数字为0, 2, 6, 8中的一个则需要落笔绘制)t.left(90) #走完1234段数码管,到第5段时需直走,在原来right90的基础上恢复过来就left90drawLine(True) if dight in [0, 4, 5, 6, 8, 9] else drawLine(False) #判断第5段数码管(如果数字为0, 4, 5, 6, 8, 9则需要落笔绘制)drawLine(True) if dight in [0, 2, 3, 5, 6, 7, 8, 9] else drawLine(False) #判断第6段数码管,(如果数字为0, 2, 3, 5, 6, 7, 8, 9则需要落笔绘制)drawLine(True) if dight in [0, 1, 2, 3, 4, 7, 8, 9] else drawLine(False) #判断第7段数码管,(如果数字为0, 1, 2, 3, 4, 7, 8, 9则需要落笔绘制)t.right(180)#调整方向,让下一个绘制回归原点t.penup()#抬笔,停止绘制t.fd(20)#前进20,为后续数字确定绘制位置def draw7DightDate(date):#将取得的日期数据按七段数码管的形式处理显示,t.pencolor("red")for i in date:if i == '-':#按分隔符处理年t.write('年', font=("黑体", 12, "normal"))#t.pencolor("green")t.fd(40)elif i == '=':#按分隔符处理月t.write('月', font=("黑体", 12, "normal"))#t.pencolor("blue")t.fd(40)elif i == '+':#按分隔符处理日t.write('日', font=("黑体", 12, "normal"))t.pencolor("red")t.fd(40)elif i == '/':#按分隔符处理时t.write('时', font=("黑体", 12, "normal"))#t.pencolor("green")t.fd(40)elif i == '*':#按分隔符处理分t.write('分', font=("黑体", 12, "normal"))#t.pencolor("blue")t.fd(40)elif i == '.':#按分隔符处理秒t.write('秒', font=("黑体", 12, "normal"))t.fd(40)else: #绘制数码管数字draw7Dight(eval(i))mlingpen(-350,330)
t.pencolor("white")
t.write('现在是:', font=("黑体", 12, "bold"))
mlingpen(-280,330)
t.seth(0)
t.pensize(5)
draw7DightDate(time.strftime('%Y-%m=%d+', time.localtime()))
t.pencolor("white")
mlingpen(-350,290)
t.write('不算今天', font=("黑体", 10, "normal"))
mlingpen(-350,270)
julishengdanjie()
mlingpen(-350,250)
julispring()t.pensize(1)
for j in range(100): x = random.randint(-400, 400)y = random.randint(-300,300)dx = random.randint(1,10)for i in range(6):t.penup()t.goto(x, y)t.pendown()t.pencolor('white')t.forward(dx)t.left(60)t.circle(2)t.goto(x, y)t.hideturtle()
t.done()

八、逆境清醒草莓熊(春节版)源代码

#-*- coding: UTF-8 -*-
import turtle as t
import datetime
import time
import math
import random"""
=================================================
@Project ->Adversity Awake 草莓熊系列
@类别     : 草莓熊->草莓熊之3
@Author  : 逆境清醒
@Date    : 2022/12/18 5:46
@Desc    :https://blog.csdn.net/weixin_69553582
=================================================
"""
# 设置背景颜色,窗口位置以及大小t.colormode(255)# 颜色模式
t.speed(0)
t.screensize(900,760,"#010812")#画布大小背景颜色
t.setup(width=900, height=760,startx=None, starty=None) #绘图窗口的大小和起始坐标
#t.bgpic("cmx4_di2.gif")
t.title("逆境清醒祝您新年快乐!")#设置绘图窗口的标题
t.resizemode('noresize')  #大小调整模式:auto,user,noresize
t.tracer(0)   def mlingpen(x, y):t.penup()t.goto(x, y)t.pendown()def rose(): #roset.seth(90)mlingpen(-225, -60)t.pensize(10)t.pencolor("#035025")t.circle(300,30)mlingpen(-240, 70)t.pensize(2)t.color("#000000", "#22ac38")t.seth(12)mlingpen(-235,40)t.lt(40)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()mlingpen(-235,40)t.lt(330)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()mlingpen(-235,40)t.lt(260)t.fd(50)t.begin_fill()t.circle(-150,30)t.circle(-2,140)t.circle(-150,43)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,60)  t.begin_fill()t.color("#000000", "#f8c0c8")t.circle(50,150)t.rt(20)t.fd(40)t.rt(40)t.circle(15,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#f5aab5", "#f5aab5")t.circle(34,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#f198a5", "#f198a5")t.circle(30,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.pensize(2)t.seth(12)mlingpen(-210,65)  t.begin_fill()t.color("#ee8998", "#ee8998")t.circle(20,150)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()mlingpen(-220,80)  t.begin_fill()t.color("#e56e7f", "#e56e7f")t.circle(15,200)t.rt(20)t.fd(30)t.rt(40)t.circle(10,130)t.fd(50)t.circle(15,80)t.up()t.end_fill()t.seth(35)mlingpen(-230,90)  t.begin_fill()t.color("#000000", "#fda7b5")t.circle(50,50)t.rt(40)t.circle(25,200)t.up()t.end_fill()t.seth(130)mlingpen(-294.51,142.14)  t.begin_fill()t.color("#000000", "#fdadb8")t.circle(20,100)t.rt(90)t.circle(10,180)t.rt(90)t.circle(15,130)t.rt(110)t.circle(30,130)t.rt(50)t.circle(50,80)t.up()t.end_fill()t.seth(80)mlingpen(-240,140)  t.begin_fill()t.color("#000000", "#fe8e9e")t.circle(10,100)t.rt(90)t.circle(12,150)t.rt(90)t.circle(15,130)t.rt(50)t.circle(50,80)t.rt(10)t.circle(50,80)t.goto(-240,140)t.up()t.end_fill()t.seth(80)mlingpen(-250,140)  t.begin_fill()t.color("#f9788b", "#f9788b")t.circle(5,130)t.rt(90)t.circle(10,170)t.rt(100)t.circle(10,130)t.rt(70)t.circle(40,80)t.rt(40)t.circle(30,30)t.goto(-250,140)t.up()t.end_fill()t.seth(10)mlingpen(-245, 80)t.begin_fill()  t.color("#000000", "#ef5f7a")t.seth(35)t.circle(30,80)t.rt(80)t.circle(10,150)t.rt(80)t.circle(17,200)t.rt(60)t.circle(29,120)t.goto(-245, 80)t.up()t.end_fill()t.seth(10)mlingpen(-250, 85)t.begin_fill()  t.color("#ef758c", "#ef758c")t.seth(35)t.circle(25,80)t.rt(80)t.circle(6,150)t.rt(80)t.circle(12,210)t.rt(60)t.circle(23,120)t.goto(-250, 85)t.up()t.end_fill()t.seth(0)  mlingpen(-250,125)t.pensize(5)t.dot("#ff4969")t.pensize(2)mlingpen(-266.97,121.26)t.pencolor("#321320")t.fillcolor("#f04969")t.begin_fill()t.rt(80)t.circle(12,150)t.rt(80)t.circle(6,270)t.rt(150)t.circle(10,180)t.up()t.end_fill()#t.color("#000000", "#f04969")t.seth(-70)mlingpen(-210,100)  t.begin_fill()t.color("#000000", "#f04969")t.rt(20)t.fd(30)t.circle(-40,170)t.lt(20)t.fd(20) t.goto(-210,100)t.up()t.end_fill()t.seth(-70)mlingpen(-215,90)  t.begin_fill()t.color("#ee627d", "#ee627d")t.rt(20)t.fd(20)t.circle(-35,170)t.lt(20)t.fd(15)t.goto(-220,90)t.up()t.end_fill()t.seth(-70)mlingpen(-220,80)  t.begin_fill()t.color("#f47a91", "#f47a91")t.rt(20)t.fd(10)t.circle(-28,170)t.lt(20)t.fd(10)t.goto(-220,90)t.up()t.end_fill()t.seth(150)mlingpen(-220,100)  t.begin_fill()t.color("#000000", "#f7cad1")t.circle(20,80)t.rt(10)t.circle(-40,70)t.rt(10)t.circle(20,80)t.rt(5)t.circle(5,180)t.rt(80)t.circle(20,70)t.rt(80)t.circle(40,60)t.rt(10)t.circle(40,110)t.goto(-220,100) t.up()t.end_fill()t.seth(150)mlingpen(-220,98)  t.begin_fill()t.color("#ffe9f2", "#ffe9f2")t.circle(15,80)t.rt(7)t.circle(-45,75)t.rt(8)t.circle(20,50)t.rt(5)t.circle(2,200)t.rt(80)t.circle(15,85)t.rt(80)t.circle(40,60)t.rt(20)t.circle(30,70)t.goto(-220,98) t.up()t.end_fill()t.seth(150)mlingpen(-180,55)  t.begin_fill()t.color("#000000", "#f7cad1")t.circle(30,80)t.rt(10)t.circle(-60,70)t.rt(5)t.circle(30,80)t.rt(5)t.circle(5,180)t.rt(90)t.circle(30,80)t.rt(80)t.circle(40,70)t.circle(20,50)t.rt(90)t.circle(20,95)t.goto(-180,55)t.up()t.end_fill()t.seth(150)mlingpen(-190,50)  t.begin_fill()t.color("#f7e0e3", "#f7e0e3")t.circle(25,80)t.rt(8)t.circle(-55,75)t.rt(3)t.circle(25,60)t.rt(6)t.circle(5,200)t.rt(90)t.circle(30,80)t.rt(80)t.circle(22,80)t.circle(20,40)t.rt(80)t.circle(15,90)t.goto(-190,50)t.up()t.end_fill()mling_circle_list = iter([  # 每段弧线(半径,弧角度数)(18, 360), (14, 360), (10, 360), (6, 360),(18, 360), (14, 360), (10, 360), (6, 360),
])def mling_draw_eyeball(zb1,zb2,zb3,zb4):  for zb, color_ in zip([zb1,zb2,zb3,zb4], ['#ffffff', '#482d08', '#000000', '#ffffff']):t.penup()t.goto(*zb)t.pendown()t.begin_fill()t.setheading(0)t.color(color_)t.pencolor('#000000')t.pensize(2)t.circle(*next(mling_circle_list))t.end_fill()t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#cb3263")
t.pensize(4)
t.goto(120,110)
t.pendown()
t.begin_fill()
t.goto(200,0)
t.left(-40)
t.circle(-110,105)
t.left(75)
t.goto(170,-110)
t.left(-80)
t.circle(30,40)
t.left(60)
t.circle(-80,70)
t.left(83)
t.circle(-35,95)
t.goto(60,-270)
t.left(-80)
t.circle(-65,70)
t.left(63)
t.circle(35,30)
t.left(130)
t.circle(-65,70)
t.goto(-120,-270)
t.left(-110)
t.circle(-35,80)
t.left(83)
t.circle(-80,50)
t.left(60)
t.circle(-80,60)
t.left(60)
t.circle(30,30)
t.left(20)
t.circle(80,80)
t.left(-105)
t.circle(-70,150)
t.left(50)
t.circle(-170,50)
t.goto(120,110)
#Author:Adversity Awake
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#ffffff")
t.pensize(4)
t.goto(90,60)
t.pendown()
t.begin_fill()
t.right(30)
t.circle(-130,360)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#015426")
t.pensize(4)
t.goto(-250,-55)
t.dot("blue")
t.seth(0)
t.pendown()
t.begin_fill()
t.right(-55)
#t.circle(-45,270)
t.circle(-35,70)
t.goto(-200,-165)
t.goto(-250,-165)
t.goto(-220,-75)
t.goto(-250,-55)
t.end_fill()rose()t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#f3d2ad")
t.pensize(4)
t.goto(185,-90)
t.pendown()
t.begin_fill()
t.right(140)
t.circle(43,95)
t.goto(185,-90)
t.end_fill()
t.penup()
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#cb3263')
t.pensize(4)
t.begin_fill()
t.goto(21,0)
t.pendown()
t.circle(123,134)
t.left(-90)
t.circle(40,185)
t.left(-60)
t.circle(120,60)
t.left(-90)
t.circle(50,200)
t.left(-90)
t.circle(100,100)
t.left(-12)
t.circle(100,40)
t.goto(21,0)
t.penup()
#Author:Adversity Awake
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(-70,210)
t.left(140)
t.pendown()
t.circle(30,200)
t.goto(-70,210)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(90,220)
t.left(45)
t.pendown()
t.circle(22,200)
t.goto(90,220)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.left(-98)
t.left(90)
t.goto(18,10)
t.pendown()
t.circle(100,134)
t.left(10)
t.circle(110,30)
t.left(10)
t.circle(160,40)
t.circle(85,40)
t.left(2)
t.circle(95,40)
t.left(5)
t.circle(95,60)
t.goto(18,10)
t.penup()
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(25,240)
t.pendown()
t.begin_fill()
t.goto(60,235)
t.left(30)
t.fd(8)
t.left(90)
t.fd(22)
t.circle(90, 8)
t.left(20)
t.circle(90, 8)
t.left(20)
t.circle(90, 20)
t.left(40)
t.circle(50, 20)
t.end_fill()
t.penup()
t.pensize(12)
t.goto(-2,250)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.goto(60,240)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(-55,193)
t.pendown()
t.begin_fill()
t.left(65)
t.circle(-90, 25)
t.goto(-10,230)
t.left(30)
t.fd(8)
t.left(90)
t.fd(18)
t.circle(90, 8)
t.left(20)
t.circle(90, 10)
t.left(40)
t.circle(90, 30)
t.left(30)
t.circle(40, 20)
t.penup()
t.end_fill()
t.pensize(12)
t.goto(-63,195)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.left(100)
t.circle(-85,45)
t.end_fill()mling_draw_eyeball((-20,180), (-23,185), (-25,188), (-30,200))
mling_draw_eyeball((30, 193), (27, 200), (25,203), (20,213)) t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(3)
t.goto(25,105)
p = t.pos()
t.pendown()
t.begin_fill()
t.circle(85, 65)
t.left(16)
t.circle(30, 55)
t.left(20)
t.circle(145, 58)
t.left(8)
t.circle(20, 55)
t.left(8)
t.circle(50, 65)
t.left(-5)
t.circle(310, 8)
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#a93e54')
t.pensize(3)
t.begin_fill()
t.left(-20)
t.goto(9,66)
t.pendown()
t.circle(68,40)
t.left(10)
t.circle(65,40)
t.left(160)
t.circle(-75,85)
t.left(158)
t.circle(48,37)
t.goto(9,66)
t.penup()
t.end_fill()
t.color('#FFFF00')
t.penup()
#t.goto(260,60)
#t.pendown()
mlingpen(310,-50)
t.write("祝\n你\n节\n日\n快\n乐\n",align="center",font=("黑体",22,"bold"))
t.penup()
t.goto(350,40)
t.pendown()
t.write("逆\n境\n清\n醒\n",align="center",font=("黑体",15,"bold"))def liwuhe(): #liwuhe#AdversityAwaket.seth(-90)  t.pencolor('#ca7124')t.fillcolor('#fddeaf')t.pensize(3)mlingpen(266,-55)t.begin_fill()t.fd(130)t.rt(80)t.fd(80)t.rt(100)t.fd(132)t.rt(80)t.goto(266,-55)t.up()t.end_fill()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#f8b756')t.pensize(3)mlingpen(186,-70)t.begin_fill()t.fd(130)t.rt(110)t.fd(110)t.rt(70)t.fd(110)t.rt(80)t.goto(186,-70)t.up()t.end_fill()#AdversityAwaket.seth(0)t.pencolor('#ca7124')t.fillcolor('#e8a846')t.pensize(3)mlingpen(186,-35)t.begin_fill()t.lt(6)t.fd(86)t.lt(170)t.fd(90)t.goto(80,-23)t.goto(186,-35)t.end_fill()t.up()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#fce3b8')t.pensize(3)mlingpen(270,-25)t.begin_fill()t.fd(30)t.rt(80)t.fd(85)t.rt(105)t.fd(34)t.rt(80)t.goto(270,-25)t.end_fill()t.up()#AdversityAwaket.seth(-90)t.pencolor('#ca7124')t.fillcolor('#e8a846')t.pensize(3)mlingpen(186,-34)t.begin_fill()t.fd(34)t.rt(100)t.fd(110)t.rt(78)t.fd(30)t.rt(75)t.goto(186,-34)t.end_fill()t.up()#AdversityAwaket.seth(90)t.pencolor('#fe000b')t.fillcolor('#fe000b')t.pensize(20)mlingpen(130,-55)t.fd(26)t.rt(80)t.fd(90)t.bk(40)t.rt(25)t.fd(50)t.rt(80)t.goto(240,-60)t.dot(30,"white")mlingpen(170,-20)t.goto(130,10)t.goto(110,-10)t.goto(170,-20)mlingpen(170,-20)t.goto(230,15)t.goto(250,-10)t.goto(170,-20)t.up()t.dot(30,"white")mlingpen(190,-10)t.dot(30,"white")mlingpen(130,-55)t.dot(30,"white")liwuhe()t.hideturtle()
t.done()

   推荐阅读:

原创唯美浪漫情人节表白专辑,(复制就可用)(html5,css3,svg)更好的向你所喜欢的人表达内心的感受。

2023年春节祝福第二弹——送你一只守护兔,让它温暖每一个你【html5 css3】画会动的小兔子
25

2023春节祝福系列第一弹(放飞祈福孔明灯,祝福大家身体健康)(附完整源代码及资源免费下载)
24

​​

HTML+CSS+svg绘制精美彩色闪灯圣诞树,HTML+CSS+Js实时新年时间倒数倒计时(附源代码)

23

​​

​草莓熊python绘图(春节版,圣诞倒数雪花版)附源代码

22

​​

【程序人生】卡塔尔世界杯元素python海龟绘图(附源代码),世界杯主题前端特效5个(附源码)

21

​​

​​

python爱心源代码集锦
20

​​

​​

巴斯光年python turtle绘图__附源代码
19

​​

​​​

Three.js实例详解___旋转的精灵女孩(附完整代码和资源)
18

​​

​​​​

​草莓熊python turtle绘图(玫瑰花版)附源代码

17

​​

​​​​

立体多层玫瑰绘图源码__玫瑰花python 绘图源码集锦

16

​​

​​​​

皮卡丘python turtle海龟绘图(电力球版)附源代码

15

​​

​​​​

【CSDN云IDE】个人使用体验和建议(含超详细操作教程)(python、webGL方向)

14

​​

​​​​

草莓熊python turtle绘图(风车版)附源代码

13

​​

​​​​

用代码过中秋,python海龟月饼你要不要尝一口?

12

​​

​​​​

《 Python List 列表全实例详解系列》__系列总目录

11

​​

​​​​

用代码写出浪漫__合集(python、matplotlib、Matlab、java绘制爱心、玫瑰花、前端特效玫瑰、爱心)

10

​​

​​​​

Python函数方法实例详解全集(更新中...)

9

​​

​​​​

matplotlib 自带绘图样式效果展示速查(28种,全)

8

​​

​​​​

手机屏幕坏了____怎么把里面的资料导出(18种方法)

7

​​

​​​​

2023年1月多家权威机构____编程语言排行榜__薪酬状况

6

​​

​​​​

Python中Print()函数的用法___实例详解(全,例多)

5

​​

​​​​

色彩颜色对照表(300种颜色)(16进制、RGB、CMYK、HSV、中英文名)

4

​​

​​​​

Node.js (v19.1.0npm 8.19.3) vue.js安装配置教程(超详细)

3

​​

​​​​

Tomcat 启动闪退问题解决集(八大类详细)

2

​​

​​​​

Tomcat端口配置(详细)

1

​​

​​​​

Tomcat10 安装(Windows环境)(详细)

​草莓熊python绘图(春节版,圣诞倒数雪花版)附源代码相关推荐

  1. Python绘图制作混淆矩阵图--简易版(改矩阵参数就能运行)

    #confusion_matrix import numpy as np import matplotlib.pyplot as plt # classes = ['A','B','C','D','E ...

  2. 吐血整理Python体系练手项目500例(附源代码),练完可显著提升python水平

    1.有一个jsonline格式的文件file.txt大小约为10K 2.补充缺失的代码 3.输入日期, 判断这一天是这一年的第几天? 4.打乱一个排好序的list对象alist? 5.现有字典 d= ...

  3. 吐血整理Python体系练手项目500例(附源代码),练完可就业

    1.有一个jsonline格式的文件file.txt大小约为10K 2.补充缺失的代码 3.输入日期, 判断这一天是这一年的第几天? 4.打乱一个排好序的list对象alist? 5.现有字典 d= ...

  4. 用 Python 写一个经典的飞机大战(附源代码)

    当年微信 5.0 发布时,首页被设置成了一款新推出的小游戏,它就是微信版飞机大战,游戏一经推出便是火爆异常,铅笔画风格的游戏界面也受到了很多人的喜欢. 最近重温了一下这款小游戏,尽管时隔多年,但无论是 ...

  5. python快递费用计算_[Python]简单用Python写个查询快递的程序最后附源代码

    [Python] 纯文本查看 复制代码from requests_html import HTMLSession session = HTMLSession() def sb(dh): '''用来识别 ...

  6. 教你用Python将图片转化为字符画!附源代码

    点击上方 "程序员小乐"关注公众号, 星标或置顶一起成长 每天早上8点20分, 第一时间与你相约 每日英文 Whatever you are facing today, remem ...

  7. 【Android笔记65】Android小案例之简易版的房贷计算器(附源代码)

    这篇文章,主要介绍如何使用Android实现一个简易版的房贷计算器小案例. 目录 一.房贷计算器 1.1.运行效果演示 1.2.前提准备 (1)等额本息和等额本金

  8. C++和python代码实现朗读文本的功能(附源代码)

    闲来无事,平时就喜欢看看小说之类的.突发奇想,好多小说软件上的听小说功能都是收费的,咱们写个小程序读一读,岂不是很哇塞! 看了一些资料,这里给大家分享出来,已经测试可以用. C++代码和python代 ...

  9. python实现Excel文件读取的程序(附源代码)

    python实现Excel文件读取的程序   前一段时间帮一个朋友用python写了一个读Excel程序操作的程序,具体要求为:读取两个Excel文件,根据其中某个特征的特征值对这两个文件进行取交集操 ...

最新文章

  1. python刷新页面_小伙利用Python制作浏览器,网友点评这小伙将来要进腾讯
  2. 测试嵌套JavaScript对象键的存在
  3. jquery div拖动效果示例代码
  4. 英语口语小组PPT--袁隆平
  5. lol模型导入ue4_Houdini amp; UE4 程序化建模——石头(一)基础工作流
  6. docker nacos mysql nginx 集群多台
  7. shell 获取字符串前两个字符串、获取字符串最后一个字符、去掉字符串最后一个字符、去掉末尾一个字符、去掉末尾两个字符
  8. C#利用NI VAS采集图片
  9. RHEL6入门系列之十七,打包与压缩
  10. Node.js文件操作二
  11. 查看openssh版本_新版的Reveal如何查看越狱手机APP
  12. MySQL事务基础,看这篇就够了!
  13. 【Oracle】开、关、删归档日志(archivelog)
  14. ngrok下载并运行实现内网穿透
  15. 理清contactsprovider
  16. Linux创翼拨号上网,创翼客户端下载(网络拨号工具) v4.11.4.731 最新版_数码资源网...
  17. python学期学习总结
  18. 旅游|受不住热暑的炎烤 就到山上“凉拌”空气去
  19. 欢迎加入我们的前端技术交流群
  20. linux 终端命令行的快捷键列表

热门文章

  1. JDBC插入数据后返回新数据id
  2. mobilefacenet caffe2WK
  3. CS5265方案应用|TYPEC投屏方案| Type-C转HDMI4K60HZ转换方案
  4. ARM 立即数范围以及合法立即数
  5. Qt · 密码输入框检测并显示大写锁定键已打开
  6. POI操作ppt图表完整示例演示
  7. Fluent Bit的下载量达到10亿!
  8. 手机端html跑马灯效果,js实现跑马灯效果 很好用
  9. D.G.Pals游戏5月23日晚9点新上线,布局Cronos协议Panterra游戏生态
  10. 水货iPad 2价格骤降数千元