Python制作表白愛(ài)心合集
導(dǎo)語(yǔ)
"盤(pán)子里最后一塊肉給你 一 冰激凌的第一口給你 一手機(jī)最后的10%電量給你!"
哈嘍大家好!我是木木子,我要開(kāi)始給大家放大招啦
你來(lái)之后,苦都不太苦,甜都特別甜
如果人類有尾巴的話,說(shuō)起來(lái)有點(diǎn)不好意思 ,只要和你在一起,一定會(huì)止不住搖起來(lái)
我害怕你找不到我,所以我要藏在你心里
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.
浮世萬(wàn)千,吾愛(ài)有三。日,月與卿。日為朝,月為暮,卿為朝朝暮暮。
下面這幾套表白小項(xiàng)目送給大家 希望大家喜歡?
正文
一、愛(ài)心表白:做我女朋友吧,行就行,不行我再想想辦法
1)效果展示

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()二、愛(ài)心表白:??有兩個(gè)心愿:你在身邊,在你身邊
1)效果展示

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()三、愛(ài)心表白:君初相識(shí),猶如故人歸。天涯明月新,朝暮最相思
1)效果展示?

2)附主程序
import turtle as t
def heart(x,y,z): # 繪制愛(ài)心
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制作表白愛(ài)心合集的詳細(xì)內(nèi)容,更多關(guān)于Python表白愛(ài)心的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
使用SimpleITK讀取和保存NIfTI/DICOM文件實(shí)例
這篇文章主要介紹了使用SimpleITK讀取和保存NIfTI/DICOM文件實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2020-07-07
Python虛擬環(huán)境庫(kù)virtualenvwrapper安裝及使用
這篇文章主要介紹了Python虛擬環(huán)境庫(kù)virtualenvwrapper安裝及使用,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2020-06-06
淺談python str.format與制表符\t關(guān)于中文對(duì)齊的細(xì)節(jié)問(wèn)題
今天小編就為大家分享一篇淺談python str.format與制表符\t關(guān)于中文對(duì)齊的細(xì)節(jié)問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-01-01
python中BackgroundScheduler和BlockingScheduler的區(qū)別
這篇文章主要介紹了python中BackgroundScheduler和BlockingScheduler的區(qū)別,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2021-07-07
如何使用Python 抓取和優(yōu)化所有網(wǎng)站圖像
我發(fā)布了一個(gè)通過(guò)FTP自動(dòng)優(yōu)化新圖像的教程。這次我們將抓取整個(gè)網(wǎng)站,并在本地優(yōu)化我們遇到的圖像,按URL組織,怎么來(lái)操作呢,下面跟隨小編一起學(xué)習(xí)使用Python 抓取和優(yōu)化所有網(wǎng)站圖像的方法,感興趣的朋友一起看看吧2023-02-02

