Python制作表白爱心合集


Posted in Python onJanuary 22, 2022
目录

导语

"盘子里最后一块肉给你 一 冰激凌的第一口给你 一手机最后的10%电量给你!"

哈喽大家好!我是木木子,我要开始给大家放大招啦

你来之后,苦都不太苦,甜都特别甜

如果人类有尾巴的话,说起来有点不好意思 ,只要和你在一起,一定会止不住摇起来

我害怕你找不到我,所以我要藏在你心里

I love three things in the world.The sun,the moon and you.The sun for the day,the moon for the night,and you for ever.

浮世万千,吾爱有三。日,月与卿。日为朝,月为暮,卿为朝朝暮暮。

下面这几套表白小项目送给大家 希望大家喜欢​

正文

一、爱心表白:做我女朋友吧,行就行,不行我再想想办法

1)效果展示

Python制作表白爱心合集

2)附主程序

t=turtle.pen()
t=turtle
t.up()
t.goto(0,150)
t.down()
t.color('pink')
t.begin_fill()
t.fillcolor('pink')
t.speed(1)
t.left(45)
t.forward(150)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(250+math.sqrt(2)*100)
t.right (90)
t.speed(2)
t.forward(250+100*math.sqrt(2))
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(150)
t.end_fill()
t.goto(-10,0)
t.pencolor('white')
#L
t.pensize(10)
t.goto(-50,0)
t.goto(-50,80)
t.up ()
#I
t.goto(-100,0)
t.down()
t.goto(-160,0)
t.goto(-130,0)
t.goto(-130,80)
t.goto(-160,80)
t.goto(-100,80)
t.up()
#O
t.goto(10,25)
t.down()
t.right(45)
t.circle(25,extent=180)
t.goto(60,55)
t.circle(25,extent=180)
t.goto(10,25)
t.up()
t.goto(75,80)
t.down()
t.goto(100,0)
t.goto(125,80)
t.up()
t.goto(180,80)
t.down()
t.goto(140,80)
t.goto(140,0)
t.goto(180,0)
t.up()
t.goto(180,40)
t.down()
t.goto(140,40)
#U
t.up()
t.goto(-40,-30)
t.down()
t.goto(-40,-80)
t.circle(40,extent=180)
t.goto(40,-30)
t.hideturtle()
a=input()

二、爱心表白:?有两个心愿:你在身边,在你身边

1)效果展示

Python制作表白爱心合集

2)附主程序

pen = turtle.Turtle()
pen.hideturtle()

pen.fillcolor('pink')
pen.begin_fill()

# set the starting direction
pen.left(110)

# draw the left bottom part
while pen.heading() < 140:
    # rotate & forward
    pen.left(1)
    pen.forward(2)

# move up
pen.forward(90)

# draw the left upper part
while pen.xcor() < 0:
    pen.right(0.8)
    pen.forward(1)

# go back to the starting point, and do the right part as a mirror
pen.up()
pen.goto(0, 0)
pen.down()

# set the direction
pen.setheading(70)

# draw the right bottom part
while pen.heading() > 40:
    # Defining step by step curve motion
    pen.right(1)
    pen.forward(2)

# move up
pen.forward(90)

# draw the right upper part
while pen.xcor() > 0:
    print(pen.xcor())
    pen.left(0.8)
    pen.forward(1)

# Ending the filling of the color
pen.end_fill()

三、爱心表白:君初相识,犹如故人归。天涯明月新,朝暮最相思

1)效果展示​

Python制作表白爱心合集

2)附主程序

import turtle as t

def heart(x,y,z):    # 绘制爱心
    t.pensize(2)
    t.pencolor("black")
    if z == 1:
        t.fillcolor("red")
    elif z == 0:
        t.fillcolor("pink")
    t.begin_fill()     #左半边
    t.penup()
    t.goto(x,y)
    t.pendown()
    t.circle(50,180)
    t.circle(180,37)
    t.left(46)      #右半边
    t.circle(180,37)
    t.circle(50, 182)
    t.end_fill()
def arrow1(x,y):
   t.pensize(5)
    t.pencolor("black")
    t.fillcolor("brown")
    t.penup()
    t.goto(x, y)
    t.pendown()
    t.setheading(210)
    t.forward(150)
    t.begin_fill()
    t.left(30)
    t.forward(20)
    t.right(30)
    t.forward(50)
    t.right(150)
    t.forward(20)
    t.left(120)
    t.forward(20)
    t.right(150)
    t.forward(50)
    t.right(30)
    t.forward(20)
    t.end_fill()
def arrow2(x, y):
    t.pensize(5)
    t.pencolor("black")
    t.fillcolor("brown")
    t.penup()
    t.goto(x, y)
    t.pendown()
    t.begin_fill()
    t.setheading(30)
    t.forward(100)
    t.left(90)
    t.forward(8)
    t.right(120)
    t.forward(16)
    t.right(120)
    t.forward(16)
    t.right(120)
    t.forward(8)
    t.end_fill()
def main():
    t.setheading(90)
    heart(50, 130, 0)
    t.setheading(120)
    heart(0, 100, 1)
    arrow1(-20, 60)
    arrow2(100, 130)
    t.hideturtle()
    t.exitonclick()

以上就是Python制作表白爱心合集的详细内容,更多关于Python表白爱心的资料请关注三水点靠木其它相关文章!

Python 相关文章推荐
Python实现二维有序数组查找的方法
Apr 27 Python
Python的Twisted框架中使用Deferred对象来管理回调函数
May 25 Python
Django学习笔记之ORM基础教程
Mar 27 Python
Python实现爬虫设置代理IP和伪装成浏览器的方法分享
May 07 Python
对Python多线程读写文件加锁的实例详解
Jan 14 Python
简单了解python gevent 协程使用及作用
Jul 22 Python
Tensorflow 模型转换 .pb convert to .lite实例
Feb 12 Python
python使用PIL剪切和拼接图片
Mar 23 Python
Python类super()及私有属性原理解析
Jun 15 Python
python如何删除列为空的行
Jul 17 Python
python利用递归方法实现求集合的幂集
Sep 07 Python
Python绘制K线图之可视化神器pyecharts的使用
Mar 02 Python
基于Python实现一个春节倒计时脚本
Jan 22 #Python
详解Python如何批量采集京东商品数据流程
Jan 22 #Python
用Python实现屏幕截图详解
Jan 22 #Python
Python实现学生管理系统并生成exe可执行文件详解流程
Jan 22 #Python
django中websocket的具体使用
Jan 22 #Python
Django+Nginx+uWSGI 定时任务的实现方法
Jan 22 #Python
梳理总结Python开发中需要摒弃的18个坏习惯
Jan 22 #Python
You might like
php实现的一个很好用HTML解析器类可用于采集数据
2013/09/23 PHP
高质量PHP代码的50个实用技巧必备(上)
2016/01/22 PHP
[原创]php实现数组按拼音顺序排序的方法
2017/05/03 PHP
laravel Model 执行事务的实现
2019/10/10 PHP
使用Javascript和DOM Interfaces来处理HTML
2006/10/09 Javascript
JavaScript聚焦于第一个字段的代码
2010/10/15 Javascript
php对mongodb的扩展(小试牛刀)
2012/11/11 Javascript
ExtJS下 Ext.Direct加载和提交过程排错小结
2013/04/02 Javascript
js为空或不是对象问题的快速解决方法
2013/12/11 Javascript
js实现滑动触屏事件监听的方法
2015/05/05 Javascript
微信小程序 本地存储及登录页面处理实例详解
2017/01/11 Javascript
基于Vue实现timepicker
2017/04/25 Javascript
Vue2.0实现购物车功能
2017/06/05 Javascript
JavaScript 复制对象与Object.assign方法无法实现深复制
2018/11/02 Javascript
ios中视频的最后一桢问题解决
2019/05/14 Javascript
vue使用localStorage保存登录信息 适用于移动端、PC端
2019/05/27 Javascript
vue-router结合vuex实现用户权限控制功能
2019/11/14 Javascript
原生js实现的金山打字小游戏(实例代码详解)
2020/03/16 Javascript
Vue 使用iframe引用html页面实现vue和html页面方法的调用操作
2020/11/16 Javascript
js实现验证码干扰(动态)
2021/02/23 Javascript
[14:19]2018年度COSER大赛-完美盛典
2018/12/16 DOTA
Python高级应用实例对比:高效计算大文件中的最长行的长度
2014/06/08 Python
python抓取并保存html页面时乱码问题的解决方法
2016/07/01 Python
Python中struct模块对字节流/二进制流的操作教程
2017/01/21 Python
django项目用higcharts统计最近七天文章点击量
2019/08/17 Python
python numpy之np.random的随机数函数使用介绍
2019/10/06 Python
python单例模式原理与创建方法实例分析
2019/10/26 Python
Python如何用filter函数筛选数据
2020/03/05 Python
python+requests接口自动化框架的实现
2020/08/31 Python
HTML5实现QQ聊天气泡效果
2017/06/26 HTML / CSS
HTML5自定义属性前缀data-及dataset的使用方法(html5 新特性)
2017/08/24 HTML / CSS
美国领先的精品家居照明和装饰产品在线零售商:LightsOnline.com
2018/01/23 全球购物
Amcal中文官网:澳洲综合性连锁药房
2019/03/28 全球购物
小学优秀班集体申报材料
2014/05/25 职场文书
环保标语大全
2014/06/12 职场文书
2014年计生工作总结
2014/11/21 职场文书