20181101173,荀梓恒

20181101197,叶普旭

代码如下:

import turtle as t

t.setup(width=0.5, height=0.75, startx=None, starty=None)

t.hideturtle()

t.speed(10)

t.pensize(2)

t.penup()

t.goto(100,200)

t.pendown()

t.setheading(90)

t.begin_fill()

t.colormode(255)

t.fillcolor(255,69,0)

t.circle(100,180)

t.left(7)

t.forward(100)

a=1

for i in range(45):

if 0<=i<30:

a=a+0.2

t.lt(3)

t.fd(a)

else:

a=a-0.2

t.lt(3)

t.fd(a)

t.left(30)

t.forward(110)

t.end_fill()

t.pensize(1)

t.penup()

t.goto(17,252.5)

t.pendown()

t.goto(-23,252.5)

t.penup()

t.goto(-48,265)

t.pendown()

t.goto(-53,285)

t.penup()

t.goto(42,265)

t.pendown()

t.goto(47,288)

t.penup()

t.goto(-73,155)

t.pendown()

t.goto(-93,145)

t.penup()

t.goto(68,155)

t.pendown()

t.goto(90,145)

t.penup()

t.goto(-42,73)

t.pendown()

t.goto(-45,59)

t.penup()

t.goto(44,73)

t.pendown()

t.goto(47,60)

#头部

t.pensize(2)

t.penup()

t.goto(-97,175)

t.setheading(180)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,0,0)

t.forward(5)

t.setheading(264)

t.circle(160,30)

t.setheading(20)

t.forward(1)

t.end_fill()

t.penup()

t.goto(97,177)

t.setheading(0)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,0,0)

t.forward(5)

t.setheading(95)

t.circle(160,-30)

t.setheading(160)

t.forward(2)

t.end_fill()

#耳朵

t.penup()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,255,0)

t.goto(-58,260)

t.pendown()

t.goto(-78,120)

t.goto(-38,70)

t.goto(-32,78)

t.setheading(190)

t.circle(180,-20)

t.goto(40,70)

t.goto(72,120)

t.goto(52,260)

t.goto(22,275)

t.goto(12,230)

t.goto(-18,230)

t.goto(-28,275)

t.goto(-58,260)

t.end_fill()

#脸型

t.penup()

t.goto(-58,150)

t.pendown()

t.setheading(-15)

t.circle(220,30)

t.penup()

t.goto(-58,150)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(244,255,255)

t.goto(-60,132)

t.goto(-18,132)

t.goto(-18,142)

t.end_fill()

t.penup()

t.goto(55,150)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(244,255,255)

t.goto(57,132)

t.goto(15,132)

t.goto(15,142)

t.end_fill()

#眼

t.penup()

t.goto(-33,55)

t.setheading(225)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,0,0)

t.circle(40,270)

t.end_fill()

t.penup()

t.goto(-5,30)

t.setheading(0)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(244,255,255)

t.circle(7,360)

t.end_fill()

t.penup()

t.goto(-37,6)

t.pendown()

t.goto(-28,20)

t.goto(18,20)

t.goto(28,3)

t.penup()

t.goto(-42,35)

t.setheading(150)

t.pendown()

t.pensize(1)

t.circle(40,-30)

t.penup()

t.goto(18,20)

t.setheading(245)

t.pendown()

t.circle(40,-37)

#身体

t.begin_fill()

t.colormode(255)

t.fillcolor(255,69,0)

t.penup()

t.goto(-40,8)

t.pendown()

t.pensize(2)

t.goto(-70,-80)

t.goto(-75,-85)

t.goto(-50,-85)

t.goto(-20,-50)

t.goto(10,-50)

t.goto(45,-85)

t.goto(70,-85)

t.goto(65,-80)

t.goto(30,8)

t.goto(15,-7)

t.goto(-25,-7)

t.goto(-40,8)

t.end_fill()

#腿

t.penup()

t.goto(-25,-7)

t.pendown()

t.goto(-15,-30)

t.goto(5,-30)

t.goto(15,-7)

t.penup()

t.goto(-45,-10)

t.pendown()

t.goto(-20,-20)

t.penup()

t.goto(10,-20)

t.pendown()

t.goto(35,-10)

t.penup()

t.goto(-50,-20)

t.begin_fill()

t.colormode(255)

t.fillcolor(255,255,0)

t.goto(-50,-85)

t.goto(-75,-85)

t.goto(-20,-50)

t.end_fill()

t.penup()

t.goto(40,-20)

t.begin_fill()

t.colormode(255)

t.fillcolor(255,255,0)

t.goto(45,-85)

t.goto(70,-85)

t.goto(10,-50)

t.end_fill()

#腰带

t.penup()

t.goto(-45,59)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,255,0)

t.circle(12,80)

t.goto(-42,40)

t.end_fill()

t.penup()

t.goto(-50,43)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,69,0)

t.goto(-100,-70)

t.goto(-42,40)

t.end_fill()

t.penup()

t.goto(38,60)

t.setheading(140)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,255,0)

t.circle(12,-80)

t.goto(30,42)

t.end_fill()

t.penup()

t.goto(40,46)

t.pendown()

t.begin_fill()

t.colormode(255)

t.fillcolor(255,69,0)

t.goto(100,-70)

t.goto(33,42)

t.end_fill()

#手部

import random

for i in range(20):

m=random.randint(10,30)

x=random.randint(-600,500)

y=random.randint(-600,500)

r=random.randint(1,255)

g=random.randint(1,255)

b=random.randint(1,255)

t.pencolor((r,g,b))

t.penup()

t.goto(x,y)

t.pendown()

t.write("I am Iron Man.", font=("Times", m, "bold"))

for i in range(2):

n=random.randint(10,30)

x=random.randint(-600,500)

y=random.randint(-600,500)

r=random.randint(1,255)

g=random.randint(1,255)

b=random.randint(1,255)

t.pencolor((r,g,b))

t.penup()

t.goto(x,y)

t.pendown()

t.write("I love you three thousand times.", font=("Times", n, "bold"))

#文字

t.mainloop()

python画图比赛_Python选修课第二届Turtle绘图大赛相关推荐

  1. python绘图画猫咪_Python选修课第二届Turtle绘图大赛~画猫猫

    (a)20161401167 夏思敏 20161401179 段梦格 (b)程序源码 import turtle turtle.setup(800,800) turtle.pensize(3) tur ...

  2. 用python画图代码比卡丘-Python选修课第二届Turtle绘图大赛 (皮卡丘)

    (a) 20181004116 徐虎 20181004113 何磊 (b) import turtle as t def y(a,b): t.pu() t.goto(a,b) t.pd() def y ...

  3. Python选修课第二届Turtle绘图大赛

    1)Partner: 学号:20181505025,郝春霖 学号:20181001113,杨禹凤 2)作品图示: 3)源代码: 1 import turtle 2 import random 3 im ...

  4. Python选修课第一届Turtle绘图大赛田康林赵冰珂组

    点击此处查看视频 from turtle import* setup(600,600,200,200) #脸 penup() goto(-190,0) seth(-90) pendown() penc ...

  5. python画图实战_python实战学习之matplotlib绘图续

    学习完matplotlib绘图可以设置的属性,还需要学习一下除了折线图以外其他类型的图如直方图,条形图,散点图等,matplotlib还支持更多的图,具体细节可以参考官方文档:https://matp ...

  6. 某篮球巨星(第二届Turtle绘图大赛)

    (a) 合作伙伴 王俊杰 20171204080姚涵 20171204078 (b)代码执行结果和视频 理想结果: 实际结果: 运行视频: 点击我观看 (c) 程序源码 import turtle a ...

  7. python画图角度_Python画图

    Python画图 使用Echarts Echarts是百度开源的js绘图工具, pyecharts是Echarts的封装, 安装pip install pyecharts. pyecharts只能将绘 ...

  8. python画图横坐标_python画图把时间作为横坐标的方法

    1.需要将时间字符串转换成datetime类型,语法:data['time'] = pd.to_datetime(data['time']) 2.将时间列设置成索引列data.set_index('t ...

  9. python画图大全_python画图教程

    python画图教程内容摘要 python画图教程这个方法是通过如何设置权限,郑州室内设计教程,1真品劳力士的把头.①注册微信:纹身师教程,1注册域名即是网址2申请网站空间3把要放到网上的资料做成网页 ...

最新文章

  1. HP 服务器 iLO 远程控制软件 介绍
  2. 首次摆脱对梯度的依赖,CMU等开源Score-CAM:基于置信分数的视觉可解释性
  3. Linux C/C++多线程pthread实例
  4. java绘制图表控件_eclipse中用JAVA代码怎么画柱形图表
  5. 原生javascript淡入淡出焦点图 + Jquery实现方法
  6. ios键盘横屏_平板电脑就只能追剧玩游戏?看这款外设键盘如何让iPad爱上办公...
  7. 学习SQLAlchemy Core
  8. 【MATLAB教程案例11~20总结】优化类算法matlab仿真经验和技巧总结
  9. 手机上最好用的五笔输入法_手机输入法哪家最好用?我推荐百度,不好用你打我...
  10. python画太极八卦图_先天太极八卦图的唯一正确画法
  11. 数据分析 - pandas(7)
  12. c语言做搬山游戏,C语言实现搬山小游戏,适合新手的项目实战,超易上手!
  13. 【基于 STM32CubeMX + PWM + DMA驱动SW2812b全彩RGB灯】
  14. 云弹性:它如何影响云计算?
  15. matlab中size()函数的用法
  16. 平行泊车系统路径规划(5)
  17. uniapp 解决onReachBottom失效
  18. Golang-beego安装
  19. 基于CTC转换器的自动拼写校正端到端语音识别
  20. 斯坦福计算机系课程内容,斯坦福计算机本科课程有哪些?

热门文章

  1. 中国程序员,请挺起你的腰杆!
  2. EF Core 小坑:DbContextPool 会引起数据库连接池连接耗尽
  3. AspNet Core 下利用普罗米修斯+Grafana构建Metrics和服务器性能的监控
  4. jenkins~集群分发功能的具体实现
  5. 编写高性能 .NET 代码 第二章:垃圾回收
  6. 开源软件那么多,我们该如何选择?|洞见
  7. MySQL-02:“数据库”操作基本命令及权限笔记
  8. 如何找tensorflow-gpu版本对应的cuda和cudnn
  9. EditPlust 批量添加自定义工具
  10. ffmpeg源码分析及mp4文件解析