import turtle
import turtle as t
from time import sleepturtle.setup(650,350)
turtle.penup()
turtle.pendown()
turtle.pensize(10)#H
turtle.pencolor("red")
turtle.fd(-40)#向左40
turtle.penup()
turtle.seth(90)
turtle.fd(80)
turtle.pendown()
turtle.seth(-90)#左边的一竖,长度为160
turtle.fd(160)
turtle.penup()
turtle.seth(90)
turtle.fd(80)
turtle.seth(0)
turtle.fd(40)
turtle.pendown()
turtle.fd(40)  #向右40
turtle.penup()
turtle.seth(90)
turtle.fd(80)
turtle.pendown()
turtle.seth(-90)#右边的一竖
turtle.fd(160)#P
turtle.penup()
turtle.seth(0)
turtle.fd(40)  #H与P的距离
turtle.pendown()
turtle.seth(90)
turtle.fd(160)   #P的一竖,160
turtle.penup()
turtle.seth(-90)
turtle.fd(40)
turtle.pendown()
turtle.circle(40)#半径为40#U
turtle.penup()
turtle.seth(90)
turtle.fd(40)
turtle.seth(0)
turtle.fd(120)  #与P相距
turtle.pendown()
turtle.seth(-90)
turtle.fd(120)
turtle.circle(40,180)#半径40
turtle.seth(90)
turtle.fd(120)#xin
turtle.penup()
turtle.seth(0)
turtle.fd(-480)#回到H左
turtle.seth(-90)
turtle.fd(160)
turtle.seth(0)turtle.pendown()
def curvemove():for i in range(200):turtle.right(1)turtle.fd(1)turtle.color('red','red')
turtle.begin_fill()
turtle.left(140)
turtle.fd(111.65)
curvemove()
turtle.left(120)
curvemove()
turtle.fd(111.65)
turtle.end_fill()
#turtle.done()#I
turtle.penup()
turtle.seth(0)
turtle.fd(-160)turtle.pendown()
turtle.seth(90)
turtle.fd(160)#9
turtle.penup()
turtle.seth(0)
turtle.fd(-40)
turtle.seth(-90)
turtle.fd(60)turtle.pendown()
turtle.fd(100)
turtle.seth(90)
turtle.fd(80)
turtle.circle(25)#0
turtle.penup()
turtle.fd(-50)
turtle.seth(0)
turtle.fd(-90)
turtle.pendown()
turtle.circle(25)#9
turtle.penup()
turtle.seth(0)
turtle.fd(-50)
turtle.seth(90)
turtle.fd(-35)turtle.pendown()
turtle.fd(100)
turtle.seth(-90)
turtle.fd(20)
turtle.seth(90)
turtle.circle(25)#1
turtle.penup()
turtle.seth(0)
turtle.fd(-80)
turtle.seth(90)
turtle.fd(20)
turtle.pendown()
turtle.seth(-90)
turtle.fd(100)#2
turtle.penup()
turtle.seth(0)
turtle.fd(940)
turtle.seth(90)
turtle.fd(90)
turtle.pendown()
turtle.seth(0)
turtle.fd(50)
turtle.seth(-120)
turtle.fd(80)
turtle.seth(0)
turtle.fd(50)#0
turtle.penup()
turtle.seth(90)
turtle.fd(10)
turtle.seth(0)
turtle.fd(120)
turtle.seth(0)
turtle.fd(-80)
turtle.pendown()
turtle.circle(25)#1
turtle.penup()
turtle.seth(0)
turtle.fd(50)
turtle.seth(90)
turtle.fd(70)
turtle.pendown()
turtle.seth(-90)
turtle.fd(100)#9
turtle.penup()
turtle.seth(0)
turtle.fd(80)
turtle.seth(-90)
turtle.fd(-100)turtle.pendown()
turtle.fd(100)
turtle.seth(90)
turtle.fd(80)
turtle.circle(25)##刘turtle.penup()
turtle.fd(-180)
turtle.seth(0)
turtle.fd(-60)
turtle.pendown()
turtle.pensize(5)
turtle.pencolor("black")
turtle.seth(-45)
turtle.fd(10)
turtle.penup()
turtle.seth(0)
turtle.fd(-20)
turtle.pendown()
turtle.seth(0)
turtle.fd(40)
turtle.penup()
turtle.seth(0)
turtle.fd(-5)
turtle.pendown()
turtle.seth(-135)
turtle.fd(50)
turtle.penup()
turtle.seth(45)
turtle.fd(50)
turtle.seth(0)
turtle.fd(-30)
turtle.pendown()
turtle.seth(-45)
turtle.fd(50)
turtle.penup()
turtle.seth(0)
turtle.fd(8)
turtle.seth(90)
turtle.fd(30)
turtle.pendown()
turtle.seth(-90)
turtle.fd(10)
turtle.penup()
turtle.seth(0)
turtle.fd(8)
turtle.seth(90)
turtle.fd(30)
turtle.pendown()
turtle.seth(-90)
turtle.fd(60)
turtle.seth(135)
turtle.fd(7)
#莹
turtle.penup()
turtle.seth(0)
turtle.fd(50)
turtle.seth(90)
turtle.fd(50)turtle.pendown()
turtle.seth(0)
turtle.fd(60)
turtle.penup()
turtle.seth(0)
turtle.fd(-40)
turtle.seth(90)
turtle.fd(10)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(0)
turtle.fd(20)
turtle.seth(90)
turtle.fd(20)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(0)
turtle.fd(-40)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(90)
turtle.fd(20)
turtle.pendown()
turtle.seth(0)
turtle.fd(60)
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(90)
turtle.fd(4)
turtle.seth(0)
turtle.fd(-48)
turtle.pendown()
turtle.seth(0)
turtle.fd(40)
turtle.penup()
turtle.seth(-90)
turtle.fd(20)
turtle.seth(0)
turtle.fd(-36)
turtle.pendown()
turtle.seth(0)
turtle.fd(30)
turtle.penup()
turtle.seth(-90)
turtle.fd(20)
turtle.seth(0)
turtle.fd(-43)
turtle.pendown()
turtle.seth(0)
turtle.fd(54)
turtle.penup()
turtle.seth(0)
turtle.fd(-25)
turtle.seth(90)
turtle.fd(40)
turtle.pendown()
turtle.seth(-90)
turtle.fd(40)
turtle.penup()
turtle.seth(0)
turtle.fd(15)
turtle.seth(90)
turtle.fd(5)
turtle.pendown()
turtle.seth(-45)
turtle.fd(5)
#莹
turtle.penup()
turtle.seth(90)
turtle.fd(65)
turtle.seth(0)
turtle.fd(60)turtle.pendown()
turtle.seth(0)
turtle.fd(60)
turtle.penup()
turtle.seth(0)
turtle.fd(-40)
turtle.seth(90)
turtle.fd(10)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(0)
turtle.fd(20)
turtle.seth(90)
turtle.fd(20)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(0)
turtle.fd(-40)
turtle.pendown()
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(90)
turtle.fd(20)
turtle.pendown()
turtle.seth(0)
turtle.fd(60)
turtle.seth(-90)
turtle.fd(20)
turtle.penup()
turtle.seth(90)
turtle.fd(4)
turtle.seth(0)
turtle.fd(-48)
turtle.pendown()
turtle.seth(0)
turtle.fd(40)
turtle.penup()
turtle.seth(-90)
turtle.fd(20)
turtle.seth(0)
turtle.fd(-36)
turtle.pendown()
turtle.seth(0)
turtle.fd(30)
turtle.penup()
turtle.seth(-90)
turtle.fd(20)
turtle.seth(0)
turtle.fd(-43)
turtle.pendown()
turtle.seth(0)
turtle.fd(54)
turtle.penup()
turtle.seth(0)
turtle.fd(-25)
turtle.seth(90)
turtle.fd(40)
turtle.pendown()
turtle.seth(-90)
turtle.fd(40)
turtle.penup()
turtle.seth(0)
turtle.fd(15)
turtle.seth(90)
turtle.fd(5)
turtle.pendown()
turtle.seth(-45)
turtle.fd(5)

最终效果

Python之校庆代码相关推荐

  1. Python写的代码打包成.exe可执行文件

    Python写的代码打包成.exe可执行文件 1. 安装pyinstaller 2. [在线生成icon](http://www.ico51.cn/) 3. 打包命令 pyinstaller -i x ...

  2. python浪漫表白代码

    python浪漫表白代码 示例代码: import turtle import random# 在(x, y)处画爱心lalala def love(x, y):lv = turtle.Turtle( ...

  3. Python外壳:代码结构!(IF WHILE FOR RANGE...)

    #:octothorpe 书中说它是八脚怪物!哈哈! 注释就要在前面加上一个#符号! 在print语句里,恢复正常的符号功能! \连接符号: 这个样子就不会一行输入很多的东西,读起来不舒服!功能也是一 ...

  4. 如何学习Python开源项目代码

    2019独角兽企业重金招聘Python工程师标准>>> 阅读Python开源项目代码主要有如下三个原因: 1. 在工作过程中遇到一些问题,Google和StackOverFlow等网 ...

  5. 编程语言介绍、python解释器执行代码的过程

    内容大纲 1.编程语言介绍 (*****) 2.Python解释器 (****) 3.执行Python程序的两种方式(****) 4.变量 (*****) 一.编程语言介绍 (*****) 计算机语言 ...

  6. python代码写好了怎么运行不了-python代码可以直接运行吗 Python写了代码如何运行...

    先下载python,然后打开命令行,输入 python 你的代码文件名. 有python代码怎么编成可执行的exe程序? 如果可以能否帮小编做成可执行的exe程序儿女情长什么的,真的很影响小编行走江湖 ...

  7. python表白代码照片墙-python入会生成照片墙 利用python生成照片墙代码

    本篇文章小编给大家分享一下利用python生成照片墙代码,对大家的学习有一定的帮助,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看. PIL(Python Image Libr ...

  8. python代码块-Python中的代码块和非代码块是什么

    Python中的代码块和非代码块是什么 发布时间:2020-06-26 13:53:30 来源:亿速云 阅读:150 今天就跟大家聊聊有关Python中的代码块和非代码块是什么,可能很多人都不太了解, ...

  9. python画图完整代码-Python科学画图代码分享

    Python画图主要用到matplotlib这个库.Matplotlib 是一个 Python 的 2D绘图库,它以各种硬拷贝格式和跨平台的交互式环境生成出版质量级别的图形. 具体来说是pylab和p ...

最新文章

  1. Oracle执行计划相关(待补充)
  2. onbeforeunload与onunload事件(转)
  3. 026_html表单
  4. 表单按钮实现 type=image
  5. SpringBoot配置文件绑定到Java Bean
  6. 为什么公司宁愿花25K重新招人,也不愿花20K留住老员工?
  7. 数字逻辑要不要认真学_认真认真
  8. 绿色版Tomcat 启动 + 停止 + 随系统自动启动 - - 博客频道 - CSDN.NET
  9. 【李宏毅2020 ML/DL】补充:Support Vector Machine (SVM)
  10. TimeUnit类中的sleep() 和Thread.sleep()
  11. 互联网基础运维分工、职责和技能要求
  12. Nginx 从入门到放弃(三)
  13. BZOJ 1208 HNOI 2004 宠物收养所 splay
  14. 毕设题目:Matlab验证码识别
  15. ODBC、OLE DB、 ADO的区别
  16. 微信抢票应用-个人总结
  17. 全概率公式与贝叶斯公式
  18. 虚拟化平台VMware vCenter Server无法连接故障排查解决
  19. PHP 的 SAPI 是个什么东西(转)
  20. halting problem 详解

热门文章

  1. echarts饼图, 中间显示总数
  2. 鸟哥的Linux笔记-------磁盘与文件系统
  3. plot_route(pos_r); matlab,蚁群算法 matlab程序(已运行) - lyp2003ok的专栏 - CSDN博客
  4. 09.CSS3渐变、过渡、转换、动画
  5. linux进程cpu时间片,Linux性能监控之CPU篇
  6. Photoshop辅助线和标尺的技巧
  7. Android开发拍照图片旋转
  8. 计算机硬盘的性能指标,对于硬盘而言它有哪些性能指标
  9. 帝国cms系统7.5 文档word
  10. IOS美图秀秀(滤镜和涂鸦)和 添加阴影功能