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 psutil模块简单使用实例
Apr 28 Python
在Python下进行UDP网络编程的教程
Apr 29 Python
Python正则表达式匹配中文用法示例
Jan 17 Python
window下eclipse安装python插件教程
Apr 24 Python
Windows平台Python连接sqlite3数据库的方法分析
Jul 12 Python
使用Python的turtle模块画图的方法
Nov 15 Python
Python基于opencv调用摄像头获取个人图片的实现方法
Feb 21 Python
Python网络爬虫之爬取微博热搜
Apr 18 Python
Python 使用 docopt 解析json参数文件过程讲解
Aug 13 Python
Python3使用PySynth制作音乐的方法
Sep 09 Python
python实现最速下降法
Mar 24 Python
python time.strptime格式化实例详解
Feb 03 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,不用COM,生成excel文件
2006/10/09 PHP
手把手教你使用DedeCms的采集的图文教程
2007/03/11 PHP
PHP输入流php://input介绍
2012/09/18 PHP
如何使用php绘制在图片上的正余弦曲线
2013/06/08 PHP
php示例详解Constructor Prototype Pattern 原型模式
2015/10/15 PHP
php中array_column函数简单实现方法
2016/07/11 PHP
php提供实现反射的方法和实例代码
2019/09/17 PHP
基于jquery的设置页面文本框 只能输入数字的实现代码
2011/04/19 Javascript
利用JS解决ie6不支持max-width,max-height问题的方法
2014/01/02 Javascript
js弹出确认是否删除对话框
2014/03/27 Javascript
一个简单的全屏图片上下打开显示网页效果示例
2014/07/08 Javascript
jQuery中odd选择器的定义和用法
2014/12/23 Javascript
javascript结合Canvas 实现简易的圆形时钟
2015/03/11 Javascript
Jquery修改image的src属性,图片不加载问题的解决方法
2016/05/17 Javascript
AngularJS中的API(接口)简单实现
2016/07/28 Javascript
利用原生js和jQuery实现单选框的勾选和取消操作的方法
2016/09/04 Javascript
Vue Ajax跨域请求实例详解
2017/06/20 Javascript
vue做移动端适配最佳解决方案(亲测有效)
2018/09/04 Javascript
Vue-cli 移动端布局和动画使用详解
2020/08/10 Javascript
[01:56]无止竞 再出发——中国军团出征2017年DOTA2国际邀请赛
2017/07/05 DOTA
[01:04:48]VGJ.S vs TNC Supermajor 败者组 BO3 第一场 6.6
2018/06/07 DOTA
python实现根据图标提取分类应用程序实例
2014/09/28 Python
Python itertools模块详解
2015/05/09 Python
Django的用户模块与权限系统的示例代码
2019/07/24 Python
Python如何应用cx_Oracle获取oracle中的clob字段问题
2019/08/27 Python
使用canvas绘制贝塞尔曲线
2014/12/17 HTML / CSS
美国修容界大佬创建的个人美妆品牌:Kevyn Aucoin Beauty
2018/12/12 全球购物
Cult Gaia官网:美国生活方式品牌
2019/08/16 全球购物
新西兰杂志订阅:isubscribe
2019/08/26 全球购物
DeinDesign德国:设计自己的手机壳
2019/12/14 全球购物
工商管理应届生求职信
2013/10/07 职场文书
2014年社区工会工作总结
2014/12/18 职场文书
2015年公务员工作总结
2015/04/24 职场文书
从事会计工作年限证明
2015/06/23 职场文书
2015大学迎新晚会主持词
2015/07/16 职场文书
学校学习型党组织建设心得体会
2019/06/21 职场文书