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的Tornado框架中的日志的方法
May 02 Python
Python实现曲线点抽稀算法的示例
Oct 12 Python
python批量替换页眉页脚实例代码
Jan 22 Python
python删除过期log文件操作实例解析
Jan 31 Python
TensorFlow实现RNN循环神经网络
Feb 28 Python
Numpy中的mask的使用
Jul 21 Python
Scrapy框架使用的基本知识
Oct 21 Python
python+numpy按行求一个二维数组的最大值方法
Jul 09 Python
python3.7 openpyxl 删除指定一列或者一行的代码
Oct 08 Python
tensorflow通过模型文件,使用tensorboard查看其模型图Graph方式
Jan 23 Python
关于Python 中的时间处理包datetime和arrow的方法详解
Mar 19 Python
matplotlib部件之矩形选区(RectangleSelector)的实现
Feb 01 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
destoon实现底部添加你是第几位访问者的方法
2014/07/15 PHP
Codeigniter框架的更新事务(transaction)BUG及解决方法
2014/07/25 PHP
PHP定时执行任务实现方法详解(Timer)
2015/07/30 PHP
实例讲解PHP页面静态化
2018/02/05 PHP
PHP+Ajax实现的检测用户名功能简单示例
2019/02/12 PHP
Javascript优化技巧(文件瘦身篇)
2008/01/28 Javascript
利用Ext Js生成动态树实例代码
2008/09/08 Javascript
Javascript 中的类和闭包
2010/01/08 Javascript
JQuery 获取和设置Select选项的代码
2010/02/07 Javascript
70+漂亮且极具亲和力的导航菜单设计国外网站推荐
2011/09/20 Javascript
关于javascript function对象那些迷惑分析
2011/10/24 Javascript
JS TextArea字符串长度限制代码集合
2012/10/31 Javascript
js获取当前年月日-YYYYmmDD格式的实现代码
2016/06/01 Javascript
浅谈JS读取DOM对象(标签)的自定义属性
2016/11/21 Javascript
Vue filters过滤器的使用方法
2017/07/14 Javascript
小程序实现上传视频功能
2020/08/18 Javascript
jQuery实现评论模块
2020/08/19 jQuery
Django ManyToManyField 跨越中间表查询的方法
2018/12/18 Python
Python中的延迟绑定原理详解
2019/10/11 Python
以SQLite和PySqlite为例来学习Python DB API
2020/02/05 Python
详解python 破解网站反爬虫的两种简单方法
2020/02/09 Python
pandas.DataFrame.drop_duplicates 用法介绍
2020/07/06 Python
Python同时迭代多个序列的方法
2020/07/28 Python
Django配置跨域并开发测试接口
2020/11/04 Python
利用CSS3实现动态的二级三级菜单效果实例源码
2017/01/04 HTML / CSS
HTML table 表格边框的实现思路
2019/10/12 HTML / CSS
土耳其时尚潮流在线购物网站:Trendyol
2017/10/10 全球购物
Book Depository亚太地区:一家领先的国际图书零售商
2019/05/05 全球购物
周仰杰(JIMMY CHOO)法国官方网站:闻名世界的鞋子品牌
2019/09/27 全球购物
通信研究生自荐信
2014/02/01 职场文书
简单的项目建议书模板
2014/03/12 职场文书
计算机毕业生自荐信范文
2014/03/23 职场文书
党员四风问题个人对照检查材料
2014/10/26 职场文书
小学生2015教师节演讲稿
2015/03/19 职场文书
房贷工资证明范本
2015/06/12 职场文书
趣味运动会加油词
2015/07/18 职场文书