当前位置: 首页 > news >正文

软件开发与网站建设北京百度推广优化排名

软件开发与网站建设,北京百度推广优化排名,深圳物流公司排名前十,如何找企业联系做网站前言 嗨喽~大家好呀,这里是魔王呐 ❤ ~! 若是有真情,爱意如溪水, 若是有真爱,爱意如阳光, 若是两情相悦,又岂在朝朝暮暮, 女子淡淡的情愫,深深地想念, 浓浓的爱意&a…

前言

嗨喽~大家好呀,这里是魔王呐 ❤ ~!

若是有真情,爱意如溪水,

若是有真爱,爱意如阳光,

若是两情相悦,又岂在朝朝暮暮,

女子淡淡的情愫,深深地想念,

浓浓的爱意,蜜蜜的言语,醉了他的情,醉了他的意。

在这特别得一天给大家带来一个玫瑰花代码

更多教程源码资料电子书: 点击此处跳转文末名片获取

开发环境:

  • python 3.8 运行代码

  • pycharm 2022.3 辅助敲代码

模块使用:

本次使用均为内置模块,无需安装,导入即可使用

  • random是取随机数的模块

  • time是时间模块

  • turtle是绘图模块

  • math提供了一些基础的计算功能

代码展示

导入模块

import math
import time
import random
import turtle as t
list1=[]
for i in range(5):list1.append(int(random.uniform(-500,500)))
list2=[]
for i in range(5):list2.append(int(random.uniform(-200,-50)))
list3=[]
for i in range(8):list3.append(int(random.uniform(-400,400)))
list4=[]
for i in range(8):list4.append(int(random.uniform(-150,-50)))
list5=[]
for i in range(7):list5.append(int(random.uniform(-300,300)))
list6=[]
for i in range(7):list6.append(int(random.uniform(-200,-100)))
list7=[]
for i in range(18):list7.append(int(random.uniform(-500,500)))
list8=[]
for i in range(18):list8.append(int(random.uniform(-100,100)))
def move_pen_position(x, y):t.hideturtle()  # 隐藏画笔(先)t.up()  # 提笔t.goto(x, y)  # 移动画笔到指定起始坐标(窗口中心为0,0)t.down()  # 下笔t.showturtle()  # 显示画笔
love = input("请输入表白话语,默认为I LOVE U:")
signature = input("请签署你的名字:")
date=input("请写上日期:")
if love == '':love = 'I Love U'

初始化

t.setup(width=800, height=500)  # 窗口(画布)大小
t.color('red', 'pink')  # 画笔颜色
t.pensize(3)  # 画笔粗细
t.speed(0)  # 描绘速度

画大号爱心(位置随机)

for x,y in list(zip(list1,list2)):t.penup()t.goto(x, y)t.pendown()t.fillcolor("#A020F0")t.begin_fill()t.pencolor("#A020F0")t.forward(40)t.circle(20, 180)t.right(90)t.circle(20, 180)t.forward(40)t.end_fill()t.penup()t.goto(x, y)    

画中号爱心(位置随机)

for x,y in list(zip(list5,list6)):t.pendown()t.fillcolor("#DA70D6")t.begin_fill()t.pencolor("#DA70D6")t.forward(30)t.circle(15, 180)t.right(90)t.circle(15, 180)t.forward(30)t.end_fill()t.penup()t.goto(x, y)

画小号爱心(位置随机)

for x,y in list(zip(list3,list4)):t.pendown()t.fillcolor("#DDA0DD")t.begin_fill()t.pencolor("#DDA0DD")t.forward(20)t.circle(10,180)t.right(90)t.circle(10,180)t.forward(20)t.end_fill()t.penup()t.goto(x, y)

画点点(位置随机)

for x,y in list(zip(list7,list8)):t.pendown()t.fillcolor("#7B6BEE")t.begin_fill()t.pencolor("#7B6BEE")t.circle(3, 360)t.end_fill()t.penup()t.goto(x, y)
def DegreeCurve(n, r, d=1):for i in range(n):t.left(d)t.circle(r, abs(d))

初始位置设定

s = 0.2
# t.setup(450*5*s, 750*5*s)
t.pencolor("black")
t.fillcolor("#8A2BE2")
t.speed(100)
t.penup()
t.goto(0, 900*s)
t.pendown()

绘制花朵形状

t.begin_fill()
t.circle(200*s,30)
DegreeCurve(60, 50*s)
t.circle(200*s,30)
DegreeCurve(4, 100*s)
t.circle(200*s,50)
DegreeCurve(50, 50*s)
t.circle(350*s,65)
DegreeCurve(40, 70*s)
t.circle(150*s,50)
DegreeCurve(20, 50*s, -1)
t.circle(400*s,60)
DegreeCurve(18, 50*s)
t.fd(250*s)
t.right(150)
t.circle(-500*s,12)
t.left(140)
t.circle(550*s,110)
t.left(27)
t.circle(650*s,100)
t.left(130)
t.circle(-300*s,20)
t.right(123)
t.circle(220*s,57)
t.end_fill()

绘制花枝形状

t.left(120)
t.fd(280*s)
t.left(115)
t.circle(300*s,33)
t.left(180)
t.circle(-300*s,33)
DegreeCurve(70, 225*s, -1)
t.circle(350*s,104)
t.left(90)
t.circle(200*s,105)
t.circle(-500*s,63)
t.penup()
t.goto(170*s,-30*s)
t.pendown()
t.left(160)
DegreeCurve(20, 2500*s)
DegreeCurve(220, 250*s, -1)

绘制一个绿色叶子

t.fillcolor('#00CD00')
t.penup()
t.goto(670*s,-180*s)
t.pendown()
t.right(140)
t.begin_fill()
t.circle(300*s,120)
t.left(60)
t.circle(300*s,120)
t.end_fill()
t.penup()
t.goto(180*s,-550*s)
t.pendown()
t.right(85)
t.circle(600*s,40)

绘制另一个绿色叶子

t.penup()
t.goto(-150*s,-1000*s)
t.pendown()
t.begin_fill()
t.rt(120)
t.circle(300*s,115)
t.left(75)
t.circle(300*s,100)
t.end_fill()
t.penup()
t.goto(430*s,-1070*s)
t.pendown()
t.right(30)
t.circle(-600*s,35)
move_pen_position(300, -280)
# font:设定字体、尺寸(电脑下存在的字体都可设置)  align:中心对齐
t.write(love, font=('Arial', 20, 'bold'), align="center")

签写署名和日期

if (signature != '') & (date != ''):t.color('red', 'pink')time.sleep(2)move_pen_position(300, -320)t.hideturtle()  # 隐藏画笔t.write(signature, font=('Arial', 20), align="center")move_pen_position(300, -350)t.hideturtle()  # 隐藏画笔t.write(date, font=('Arial', 20), align="center")#1-5点击窗口关闭程序
window = t.Screen()
window.exitonclick()

爱意语录


我用短信表心意,将我爱意传予你,请你不要太在意,

你有真意我珍惜,将我诚意说与你,爱你爱你就爱你!


用最少语言,诉说给你最真的我。

用最纯的心,思念我最想的你。用最多的爱,呵护我最爱的你。


爱 是天意,一年一年,斗转星移,不求惊天动地,只想一爱到底


雨露花香是伴侣,蝴蝶双飞多甜蜜。缘分注定是天意,相爱不易多珍惜。

怀抱有你同呼吸,情意绵绵赏烟雨。两心长恋带笑意,幸福年年新天地。


最美的相遇,在岁月中沉淀,执笔流年,那些甜蜜心语,醉了时光。

蓦然回首,一往情深依旧,浪漫在时间与空间里独舞,用爱写满未来的信笺。爱你一生一世!


尾语 💝

要成功,先发疯,下定决心往前冲!

学习是需要长期坚持的,一步一个脚印地走向未来!

未来的你一定会感谢今天学习的你。

—— 心灵鸡汤

本文章到这里就结束啦~感兴趣的小伙伴可以复制代码去试试哦 😝

👇问题解答 · 源码获取 · 技术交流 · 抱团学习请联系👇

http://www.mmbaike.com/news/51557.html

相关文章:

  • 做外贸最好的网站建设重庆seo哪个强
  • 上海网络推广服务公司seo搜索引擎优化培训班
  • 深圳平台网站建设seo免费诊断
  • 海南旅游网站建设方式seo研究中心qq群
  • 四川病毒最新消息今天seo网站推广服务
  • 南通网站建设团队seo页面排名优化
  • 中山免备案网站建设谷歌浏览器下载安装2021最新版
  • 合肥做网站联系方式奇零seo赚钱培训
  • 个人建什么网站好郑州网站建设方案优化
  • 什么是营销型网站外链系统
  • 常州市网站建设设计如何开发一个软件平台
  • 推广软文范例宁波优化推广选哪家
  • 建设部网站资质升级陈述通过seo推广网络
  • 何炅做的代言网站seo网络营销公司
  • 怎么做淘宝客网站备案淘宝搜索关键词技巧
  • 政府 网站管理系统 网络 架构企业培训内容
  • 视频号的网站链接镇江网站建设企业
  • 厦门网站开发排名怎样推广
  • 养殖场在哪个网站做环评备案华夏思源培训机构官网
  • 重庆九龙坡营销型网站建设价格淘宝网官方网站
  • 沙河口网站建设小红书seo软件
  • 手机网站排名怎么做广东网络优化推广
  • proxy网站青岛谷歌seo
  • 做电影网站的成本sem优化师
  • 阿里云 企业 网站网站投放广告费用
  • 企业品牌网站营销seo排名快速
  • 鄂州网络推广seo免费诊断电话
  • 网站怎么创建培训心得体会总结
  • 做外贸一般用哪些网站好站长工具中文
  • WordPress网站被恶意登录工具刷网站排刷排名软件