程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

The most romantic confession and the most sincere feelings on Qixi Festival (Python code implementation)

編輯:Python

七夕來襲!是時候展現專屬於程序員的浪漫了!你打算怎麼給心愛的人表達愛意?鮮花禮物?代碼表白?還是創意DIY?Let's give Lizhi a wave of confession.

                         

 歡迎來到本博客️️️

                          

                                    歡迎您的到來

                      個人主頁:科研室

                    所有代碼目錄:電氣工程科研社

                           

【現在公眾號名字改為:荔枝科研社】

     看完啦,雨過雲收,神馳的天地更清朗.......

本文目錄如下:️️️

目錄

記錄一起走過的那些日子

創意代碼表白

 I want to keep walking with you

️Python代碼 

記錄一起走過的那些日子

講述和親愛的TA一起經歷的那些故事​​​​​​​Liars are puppies,哈哈哈哈

那些初見印象:Liz is amazing,It looks very sweet,聲音很溫柔,超暖心.小櫻桃、小彩虹.

​​​​​​​那些浪漫的開始:The years of whistling on electric bikes、Spring breeze blows cheeks、Watch the sunset side by side、Countless beautiful moments are imprinted in my mind,The turbulent currents hit the romantic sandstone,混入蚌中,化作一顆最美的珍珠......

那些銘記於心的大小事:Noisy years are the spice of love,A catalyst for emotional warming,And the sweet ones in that festival、Romantic little gift,Give her lipstick to see her comfortable smile,Not to mention how sweet my heart is;The surprise she prepared for me was really indescribable joy,那一切,It won't blow with the wind,It is the most beautiful rainbow in the sky,她告訴我:斯人若彩虹,遇到方知有.

那些珍貴的瞬間:I write a blog post every time I have fun,I also have a dedicated column:女朋友的浪漫邂逅,Recorded our bits and pieces.

那些對未來的期許/計劃:future plans,I am a planner,I have her in my long-term and short-term planning——荔枝,I opened a public account:【荔枝科研社】,i love lychee,I then love scientific research.I just want to take her to grow up,Become great adults together........​​​​​​​​​​​​​​

​​​​​​​​​​​​​​​​​​​​​​​​​​​​一句話,May our future be beautiful and colorful!

​​​​​​​​​​​​​​創意代碼表白

 I want to keep walking with you

            

️Python代碼 


#========牽著她的手,慢慢走下去============
import turtle
turtle.title('我想和你牽著手一直走下去')
str = '我喜歡你WLZ'
turtle.speed(20) # 畫筆速度
turtle.setup(1800, 700, 70, 70)
turtle.color('black', 'pink') # 畫筆顏色
turtle.pensize(3) # 畫筆粗細
turtle.hideturtle() # 隱藏畫筆(先)
turtle.up() # 提筆
turtle.goto(-655, -255) # 移動畫筆到指定起始坐標(窗口中心為0,0)
turtle.down() # 下筆
turtle.showturtle() # 顯示畫筆
#======畫左邊的小人=======
turtle.goto(-600, -200)
turtle.goto(-600, -120)
turtle.circle(35)
turtle.goto(-600, -200)
turtle.forward(40)
turtle.right(90)
turtle.forward(60)
turtle.hideturtle()
turtle.up()
turtle.goto(-600, -160)
turtle.down()
turtle.showturtle()
turtle.left(90)
turtle.forward(55)
turtle.right(45)
turtle.forward(20)
turtle.hideturtle()
turtle.up()
turtle.goto(-600, -145)
turtle.down()
turtle.showturtle()
turtle.goto(-545, -145)
turtle.left(90)
turtle.forward(20)
#========畫第一個愛心==============
turtle.color('red', 'red')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(-500, -153)
turtle.down()
turtle.showturtle()
turtle.right(90)
turtle.forward(30)
turtle.left(90)
turtle.forward(30)
turtle.left(45)
turtle.circle(10.6, 180)
turtle.left(180)
turtle.circle(10.6, 180)
turtle.end_fill()
#=========下一個大愛心==============
turtle.color('pink', 'red')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(-430, -143)
turtle.down()
turtle.showturtle()
turtle.left(135)
turtle.right(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(45)
turtle.circle(17.67, 180)
turtle.left(180)
turtle.circle(17.67, 180)
turtle.end_fill()
#========第三個愛心=====================
turtle.color('red', 'pink')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(-315, -133)
turtle.down()
turtle.showturtle()
turtle.left(135)
turtle.right(90)
turtle.forward(70)
turtle.left(90)
turtle.forward(70)
turtle.left(45)
turtle.circle(24.74, 180)
turtle.left(180)
turtle.circle(24.74, 180)
turtle.end_fill()
#========第四個愛心===============
turtle.color('red', 'pink')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(-187, -133)
turtle.down()
turtle.showturtle()
turtle.left(135)
turtle.right(90)
turtle.forward(70)
turtle.left(90)
turtle.forward(70)
turtle.left(45)
turtle.circle(24.74, 180)
turtle.left(180)
turtle.circle(24.74, 180)
turtle.end_fill()
#========第5個愛心===============
turtle.color('red', 'red')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(-43.7, -143)
turtle.down()
turtle.showturtle()
turtle.left(135)
turtle.right(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(45)
turtle.circle(17.67, 180)
turtle.left(180)
turtle.circle(17.67, 180)
turtle.end_fill()
#==========第6個愛心==============
turtle.color('red', 'pink')
turtle.begin_fill()
turtle.hideturtle()
turtle.up()
turtle.goto(53.88, -153)
turtle.down()
turtle.showturtle()
turtle.right(90)
turtle.right(225)
turtle.forward(30)
turtle.left(90)
turtle.forward(30)
turtle.left(45)
turtle.circle(10.6, 180)
turtle.left(180)
turtle.circle(10.6, 180)
turtle.end_fill()
#=======畫右邊的小人==========
turtle.hideturtle()
turtle.up()
turtle.goto(251.28, -255)
turtle.down()
turtle.showturtle()
turtle.goto(196.28, -200)
turtle.goto(196.28, -120)
turtle.left(90)
turtle.circle(35)
turtle.goto(196.28, -200)
turtle.left(180)
turtle.forward(40)
turtle.left(90)
turtle.forward(60)
turtle.hideturtle()
turtle.up()
turtle.goto(196.28, -160)
turtle.down()
turtle.showturtle()
turtle.right(90)
turtle.forward(55)
turtle.left(45)
turtle.forward(20)
turtle.hideturtle()
turtle.up()
turtle.goto(196.28, -145)
turtle.down()
turtle.showturtle()
turtle.right(45)
turtle.forward(55)
turtle.right(45)
turtle.forward(20)
#==========畫氣球線和氣球===============
#===第一個氣球===
turtle.hideturtle()
turtle.up()
turtle.goto(-265, -133)
turtle.down()
turtle.showturtle()
turtle.goto(-245, 0)
turtle.right(135)
turtle.circle(35)
#===第2個氣球===
turtle.hideturtle()
turtle.up()
turtle.goto(-265, -133)
turtle.down()
turtle.showturtle()
turtle.goto(-305, 80)
turtle.circle(40)
#===第3個氣球===
turtle.hideturtle()
turtle.up()
turtle.goto(-137, -133)
turtle.down()
turtle.showturtle()
turtle.goto(-167, 0)
turtle.circle(35)
#===第4一個氣球===
turtle.hideturtle()
turtle.up()
turtle.goto(-137, -133)
turtle.down()
turtle.showturtle()
turtle.goto(-117, 80)
turtle.circle(40)
#===寫字LOVE===
turtle.pencolor("GREEN")
turtle.penup()
turtle.goto(-245, 10)
turtle.write("O", move=False, align='center', font=("微軟雅黑", 30, 'normal'))
turtle.pencolor("PURPLE")
turtle.penup()
turtle.goto(-305, 90)
turtle.write("L", move=False, align='center', font=("微軟雅黑", 30, 'normal'))
turtle.pencolor("YELLOW")
turtle.penup()
turtle.goto(-167, 10)
turtle.write("V", move=False, align='center', font=("微軟雅黑", 30, 'normal'))
turtle.pencolor("ORANGE")
turtle.penup()
turtle.goto(-117, 90)
turtle.write("E", move=False, align='center', font=("微軟雅黑", 30, 'normal'))
#============寫送給誰=============
turtle.pencolor("PINK")
turtle.penup()
turtle.goto(300, 200)
turtle.write(str, move=False, align='center', font=("方正舒體", 30, 'normal'))
turtle.done()


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved