# 导入模块

import turtle

# 人

turtle.penup()

turtle.goto(-100, 100)

turtle.pendown()

turtle.color('yellow')

turtle.setheading(55)

turtle.circle(50, 280)

turtle.setheading(238)

turtle.forward(145)

turtle.setheading(-45)

turtle.circle(165, 85)

turtle.setheading(120)

turtle.forward(175)

turtle.penup()

turtle.goto(-120, 120)

turtle.pendown()

turtle.forward(25)

turtle.penup()

turtle.goto(-100, 140)

turtle.pendown()

turtle.forward(10)

turtle.penup()

turtle.goto(-110, 105)

turtle.pendown()

turtle.setheading(15)

turtle.circle(10, 60)

turtle.penup()

turtle.goto(-145, -105)

turtle.pendown()

turtle.setheading(-90)

turtle.forward(50)

turtle.penup()

turtle.goto(-100, -105)

turtle.pendown()

turtle.setheading(-90)

turtle.forward(50)

turtle.penup()

turtle.goto(-80, 65)

turtle.pendown()

turtle.setheading(30)

turtle.forward(65)

turtle.circle(10, 70)

turtle.forward(5)

turtle.circle(8, 60)

turtle.setheading(60)

turtle.circle(-5, 90)

turtle.setheading(-80)

turtle.forward(10)

turtle.setheading(30)

turtle.forward(18)

turtle.circle(-2, 180)

turtle.setheading(-150)

turtle.forward(19)

for i in range(1, 4, 1):

turtle.setheading(30)

turtle.forward(4)

turtle.circle(-2.2, 180)

turtle.forward(4.2)

turtle.setheading(170)

turtle.circle(-10, 36)

turtle.setheading(210)

turtle.forward(75)

# 心

turtle.penup()

turtle.goto(70, 90)

turtle.pendown()

turtle.color('red')

turtle.begin_fill()

turtle.fillcolor()

turtle.setheading(135)

turtle.forward(80)

turtle.circle(-40, 180)

turtle.setheading(45)

turtle.circle(-40, 180)

turtle.forward(80)

turtle.end_fill()

# 心中填字

turtle.penup()

turtle.goto(48, 155)

turtle.pendown()

turtle.color('yellow')

turtle.write('I Love You')

# 移动右下方填字

turtle.penup()

turtle.goto(200, -300)

turtle.pendown()

turtle.color('blue')

turtle.write('喜欢是棋逢对手,但爱是甘拜下风!')

turtle.hideturtle()

turtle.done()

标签:turtle,表白,python,代码,penup,setheading,pendown,forward,circle

来源: https://www.cnblogs.com/Redskaber/p/14290168.html

python写出表白_简单python 表白代码相关推荐

  1. 记第一次写出自己的简单python爬虫:GCZW3

    经过差不多一个星期的折腾,当然这其中也有做很多其他事情.周四写出来直接通过浏览器Network找到观察者网评论链接进行的爬虫,今天下午有折腾了差不多一下午,终于通过BeautifulSoup解析出的h ...

  2. python写魔兽世界脚本_用python bat写软件安装脚本 + HM NIS Edit自动生成软件安装脚本...

    2019-03-11更新:原来NSIS脚本也可以禁用64位文件操作重定向的! 1.在安装脚本的开始处定义 LIBRARY_X64. !include "MUI.nsh" !incl ...

  3. python写机器人程序_用Python写的一个多线程机器人聊天程序

    本人是从事php开发的, 近来想通过php实现即时通讯(兼容windows).后来发现实现起来特别麻烦, 就想到python.听说这家伙在什么地方都能发挥作用.所以想用python来做通讯模块...所 ...

  4. python写一个类方法_重写python脚本,在脚本的每个类中注入一个方法 - python

    假设我有一个python模块foo.py,其中包含: class Foo(object): def __init__(self): pass 接下来,我想解析此脚本,并在每个类中注入一个方法,然后将其 ...

  5. python 写一个计算器_用 Python 写个计算器

    首页 专栏 python 文章详情 0 用 Python 写个计算器 Python小二 发布于 56 分钟前 我们常见的计算辅助工具有两种,一种是古人发明的算盘,另一种就是我们现代人发明的计算器,与算 ...

  6. 用python写shell脚本_应用python编写shell脚本

    今天同事叫我编写一个shell脚本.话说,虽然我受*nix的影响甚深,但是对于*nix里随处可见的sh脚本却是讨厌之极.为什么讨厌呢?首先是因为sh脚本那莫名其妙的语法,感觉就像随写随扔的程序,完全没 ...

  7. python写采集程序_用python写的一个wordpress的采集程序

    在学习python的过程中,经过不断的尝试及努力,终于完成了第一个像样的python程序,虽然还有很多需要优化的地方,但是目前基本上实现了我所要求的功能,先贴一下程序代码: 具体代码如下: #! /u ...

  8. python写mysql脚本_使用python写一个监控mysql的脚本,在zabbix web上加上模板

    使用python写一个监控mysql的脚本,在zabbix web上加上模板: ##先使用MySQLdb的接口关联数据库. [root@cml python]# cat check_Mysql_cus ...

  9. 用python写聊天机器人_用Python 写一个机器人陪你聊天(文尾有彩蛋)

    工作一忙,原来秉烛夜谈的好友现在都很少聊天,微信都成了微信群的天下,鲜有微信好友给你发消息,想要主动发却也找不到开题话题,怎么办?用Python写一个机器人陪自己聊聊天吧.以下是源码及解析,小白都看得 ...

  10. python写爬虫教程_用Python写爬虫程序基础教程(一)

    最近身边朋友都在讨论股市是不是牛市要来了吧? 如果想自己做一个股市收盘价前三十名的涨跌幅度,又不用每天去点击网页浏览,用Python写个爬虫程序来做是不是超棒der 环境建置 安装Python 安装P ...

最新文章

  1. filebeat配置详解
  2. Redis数据库 安装
  3. 高等学校精品规划教材 计算机专业英语,计算机专业英语
  4. 5.SEH(结构化异常处理)
  5. 首尾非零正则_常用的17种正则表达式
  6. servlet规范定义的Servlet生命周期
  7. 14.refresh操作
  8. lnmp架构搭建—源码编译(nginx、mysql、php)
  9. CVPR2021开源项目,带你傲游宇宙!
  10. 【BZOJ 4516】生成魔咒
  11. 适应科技发展观的Steam教学实践
  12. 在浏览器用域名访问发现跳转到IIS Windows 界面
  13. php包含大马执行,分析一个常见的php大马并且解码过程
  14. [UE4]IsValid方法妙用
  15. OpenCV学习之多通道图像的混合
  16. 堪萨斯州立大学计算机科学,堪萨斯州立大学有哪些专业?
  17. 2014中秋节,用java为QQ游戏美女找茬写辅助
  18. 基金销售:基金转换与超级转换
  19. 基于微信小程序的货物管理系统的设计与实现-计算机毕业设计源码+LW文档
  20. Redis在手,跟我走

热门文章

  1. 使用百度统计功能快速统计网站的访问情况
  2. Matlab的round函数和OpenCV的cvRound函数的区别
  3. 对比传统广告,跨境电商海外广告投放,网红营销的优势在哪里?如何制定方案
  4. 微信小程序云开发详解
  5. 回文数判断 : C语言
  6. 机器学习算法线上部署方法
  7. 【英语】40句英文句子,学会了会让你的阅读事半功倍
  8. 去掉VS中ipch文件和.sdf文件的解决方法
  9. 21th Police Recruits
  10. JDK5~JDK14的各版本的特性