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的常见命令注入威胁
Feb 18 Python
python中urllib模块用法实例详解
Nov 19 Python
Python将DataFrame的某一列作为index的方法
Apr 08 Python
Python 比较文本相似性的方法(difflib,Levenshtein)
Oct 15 Python
Python脚本按照当前日期创建多级目录
Mar 01 Python
Python常见读写文件操作实例总结【文本、json、csv、pdf等】
Apr 15 Python
Pandas_cum累积计算和rolling滚动计算的用法详解
Jul 04 Python
Python:slice与indices的用法
Nov 25 Python
详解opencv中画圆circle函数和椭圆ellipse函数
Dec 27 Python
在pytorch 中计算精度、回归率、F1 score等指标的实例
Jan 18 Python
python递归函数求n的阶乘,优缺点及递归次数设置方式
Apr 02 Python
django 解决扩展自带User表遇到的问题
May 14 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中empty is_null和isset的测试
2013/06/29 PHP
调整PHP的性能
2013/10/30 PHP
CI框架整合smarty步骤详解
2016/05/19 PHP
php mysql操作mysql_connect连接数据库实例详解
2016/12/26 PHP
Laravel学习基础之migrate的使用教程
2017/10/11 PHP
Django中通过定时任务触发页面静态化的处理方式
2018/08/29 PHP
Javascript Boolean、Nnumber、String 强制类型转换的区别详细介绍
2012/12/13 Javascript
学习AngularJs:Directive指令用法(完整版)
2016/04/26 Javascript
jQuery获取多种input值的简单实现方法
2016/06/20 Javascript
深入分析javascript中的错误处理机制
2016/07/17 Javascript
基于Phantomjs生成PDF的实现方法
2016/11/07 Javascript
Vue.js父与子组件之间传参示例
2017/02/28 Javascript
基于JS实现限时抢购倒计时间表代码
2017/05/09 Javascript
JavaScript生成指定范围的时间列表
2018/03/19 Javascript
vue+iview 实现可编辑表格的示例代码
2018/10/31 Javascript
微信小程序常见页面跳转操作简单示例
2019/05/01 Javascript
[40:57]TI4 循环赛第二日 iG vs EG
2014/07/11 DOTA
[01:47]2018年度DOTA2最佳教练-完美盛典
2018/12/16 DOTA
python实现的多线程端口扫描功能示例
2017/01/21 Python
Python基于whois模块简单识别网站域名及所有者的方法
2018/04/23 Python
深入浅析Python2.x和3.x版本的主要区别
2018/11/30 Python
Python实现投影法分割图像示例(一)
2020/01/17 Python
浅析python 定时拆分备份 nginx 日志的方法
2020/04/27 Python
HTML5 Canvas标签使用收录
2009/07/07 HTML / CSS
印度购物网站:TATA CLiQ
2017/11/23 全球购物
介绍一下EJB的体系结构
2012/08/01 面试题
竞争上岗演讲稿
2014/01/05 职场文书
企业安全生产责任书范本
2014/07/28 职场文书
单位授权委托书范文
2014/08/02 职场文书
安全员岗位职责
2015/02/10 职场文书
大学生心理健康活动总结
2015/05/08 职场文书
《红领巾真好》教学反思
2016/02/16 职场文书
mysql知识点整理
2021/04/05 MySQL
Python anaconda安装库命令详解
2021/10/16 Python
分布式架构Redis中有哪些数据结构及底层实现原理
2022/03/13 Redis
Python OpenCV实现图形检测示例详解
2022/04/08 Python