送小公主——哆啦A梦(Python代码实现)
目录
1 送她的多啦A梦
2 白驹过隙
3 Python代码实现
1 送她的多啦A梦
一个哆啦A梦让她开心开心好久好久。我也很开心,昨天送了一个实体模型,今天用Python代码再弄一个送给她。
哆啦A梦(日语:ドラえもん,英语:Doraemon),旧译为机器猫,日本漫画《多啦A梦》及其衍生作品中的猫型机器人,本作的主人公。名字的意思是铜锣(ドラ)卫门(えもん)。
哆啦A梦肚子上拥有四次元口袋,这个口袋直接通往四次元空间,再多的东西也放得下。害怕老鼠。平时的职责是照顾野比大雄。
2 白驹过隙
虽说雁过无痕,岁月无声,而白驹过隙的光阴却在生命的每个角落不着痕迹的流,总是荡漾在我渺远的心迹,很怀念。让它停留在记忆的沙滩上,混入蚌中,化作一颗最美的珍珠.....
她的光环
天空很蔚蓝也是你的主色
我送你的红礼巾系着金色铃铛
最后的拥抱你像棉花糖一样样的柔软哆啦A梦
请把我最珍贵的东西
都装进你的百宝袋
3 Python代码实现
import turtle as t
# t.speed(3)
t.title('我的小公主,哆啦A梦')
t.pensize(8)
t.hideturtle()
t.screensize(500, 500, bg='white')#========猫脸========
t.fillcolor('#00A1E8')
t.begin_fill()
t.circle(120)
t.end_fill()
t.pensize(3)
t.fillcolor('white')
t.begin_fill()
t.circle(100)
t.end_fill()
t.pu()
t.home()
t.goto(0, 134)
t.pd()
t.pensize(4)
t.fillcolor("#EA0014")
t.begin_fill()
t.circle(18)
t.end_fill()
t.pu()
t.goto(7, 155)
t.pensize(2)
t.color('white', 'white')
t.pd()
t.begin_fill()
t.circle(4)
t.end_fill()
t.pu()
t.goto(-30, 160)
t.pensize(4)
t.pd()
t.color('black', 'white')
t.begin_fill()
a = 0.4
for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3) # 向左转3度t.fd(a) # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
t.pu()
t.goto(30, 160)
t.pensize(4)
t.pd()
t.color('black', 'white')
t.begin_fill()
for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3) # 向左转3度t.fd(a) # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
t.pu()
t.goto(-38, 190)
t.pensize(8)
t.pd()
t.right(-30)
t.forward(15)
t.right(70)
t.forward(15)
t.pu()
t.goto(15, 185)
t.pensize(4)
t.pd()
t.color('black', 'black')
t.begin_fill()
t.circle(13)
t.end_fill()
t.pu()
t.goto(13, 190)
t.pensize(2)
t.pd()
t.color('white', 'white')
t.begin_fill()
t.circle(5)
t.end_fill()
t.pu()
t.home()
t.goto(0, 134)
t.pensize(4)
t.pencolor('black')
t.pd()
t.right(90)
t.forward(40)
t.pu()
t.home()
t.goto(0, 124)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(10)
t.forward(80)
t.pu()
t.home()
t.goto(0, 114)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(6)
t.forward(80)
t.pu()
t.home()
t.goto(0, 104)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(0)
t.forward(80)#====左边的胡子====
t.pu()
t.home()
t.goto(0, 124)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(170)
t.forward(80)
t.pu()
t.home()
t.goto(0, 114)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(174)
t.forward(80)
t.pu()
t.home()
t.goto(0, 104)
t.pensize(3)
t.pencolor('black')
t.pd()
t.left(180)
t.forward(80)
t.pu()
t.goto(-70, 70)
t.pd()
t.color('black', 'red')
t.pensize(6)
t.seth(-60)
t.begin_fill()
t.circle(80, 40)
t.circle(80, 80)
t.end_fill()
t.pu()
t.home()
t.goto(-80, 70)
t.pd()
t.forward(160)
t.pu()
t.home()
t.goto(-50, 50)
t.pd()
t.pensize(1)
t.fillcolor("#eb6e1a")
t.seth(40)
t.begin_fill()
t.circle(-40, 40)
t.circle(-40, 40)
t.seth(40)
t.circle(-40, 40)
t.circle(-40, 40)
t.seth(220)
t.circle(-80, 40)
t.circle(-80, 40)
t.end_fill()#====领带=====
t.pu()
t.goto(-70, 12)
t.pensize(14)
t.pencolor('red')
t.pd()
t.seth(-20)
t.circle(200, 30)
t.circle(200, 10)#====铃铛=====
t.pu()
t.goto(0, -46)
t.pd()
t.pensize(3)
t.color("black", '#f8d102')
t.begin_fill()
t.circle(25)
t.end_fill()
t.pu()
t.goto(-5, -40)
t.pd()
t.pensize(2)
t.color("black", '#79675d')
t.begin_fill()
t.circle(5)
t.end_fill()
t.pensize(3)
t.right(115)
t.forward(7)
t.mainloop()
送小公主——哆啦A梦(Python代码实现)相关推荐
- 用python画哆啦a梦的代码解释_python画哆啦A梦和大雄
最近从后台收到的消息来看,不少读者对 python 的 turtle 这个库感兴趣,也收到了读者想用 python 画各种图的各种需求.和一些读者沟通后才知道是学校布置了相关的作业,或者是自己想用这个 ...
- python哆啦a梦完整代码_Python执笔画图,代码一跑,哆啦A梦就出来了!
环境: python 3.6 sublime text 3 turtle模块 核心就是turtle模块,它可以让你使用海龟图形(turtle graphics)绘制图像. 先介绍下关于它的使用方法: ...
- 用python哆啦a梦的代码_【Python】绘制哆啦A梦
from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...
- python画图哆啦a梦-Python—turtle画图(哆啦A梦)
[知识延伸] 在Python中有一个名为turtle的工具,也可以称他为画图工具,这是一种Python所独有的工具.是他为我们所包装好的模块,在这里 [要求] 今天我们利用turtle画图来绘制一个哆 ...
- python画图哆啦a梦-python 绘制哆啦A梦
[实例简介] 绘制哆啦A梦 [实例截图] [核心代码] #!/usr/bin/python # -*- coding: UTF-8 -*- # 哆啦A梦 import turtle def flyTo ...
- java绘图机器猫_canvas哆啦A梦图形代码
HTML5 canvas哆啦A梦机器猫图形代码是利用HTML5 canvas技术绘制的机器猫. canvas画图的基本知识 context:一直觉得这个翻译成"上下文"真够蛋疼的, ...
- python好学吗 小木虫-25行Python代码完成人脸识别
以下是Shantnu Tiwari的客座文章,作者有着在底层编程和嵌入式领域十年的工作经验.在发现Python语言之前的几年时间里,Shantnu Tiwari一直忍受着C/C++语言编程的不便,但P ...
- python代码技巧_几个小技巧让你的Python代码更Pythonic
Python是一门非常灵活的语言,很多语法是其他语言不具备的,特别是对于从C.Java等语言转向Python的人来说,很容易按照C.Java等语言的写法来写Python,对于初学者来说,如果对Pyth ...
- java版哆啦a梦游戏_GitHub - wwz223/adventures-doraemon: 基于java实现的窗口类小游戏哆啦A梦历险记...
基于java的哆啦a梦历险记 运行方式:打开dn.five.Test包,运行GameBoard.java即可 操作方式:空格代表开始或者暂停,键盘上下左右控制哆啦A梦移动 该项目诞生于一次java学习 ...
最新文章
- python单词意思-python实现单词本功能
- 4.11 一维到三维推广-深度学习第四课《卷积神经网络》-Stanford吴恩达教授
- nginx+tomcat 反向代理 负载均衡配置
- ElasticSearch 创建父子类型
- linux mk创建文件,Linux运维知识之Linux mkkickstart建立安装的组态文件命令详解
- python登录并关注公众号_python微信公众号之关注公众号自动回复
- spring中aop事务
- Shape Number (最小表示法)
- exchange 2010申请分配证书服务提示:证书无效,不可用于exchange server
- Soul 网关源码阅读(一) 概览
- 谷歌浏览器中加载Vue插件
- Python—字典的操作
- 中国熊果苷市场运营效益及投资盈利预测报告(新版)2022-2027年
- FATAL: Failed to start gitlab-runner: “systemctl“ failed: exit status 5, Failed to start gitlab-runn
- iscript脚本截取字符串
- 基于matlab的交通信号模糊控制系统设计
- 【C语言】动手写一个哈希表
- 【开源分享】多端发布的单商户商城系统
- 七夕祭( Poetize系列)
- 2016年linux认证考试,2016年Linux认证考试模拟练习及答案