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

江苏省建设厅八大员考试报名网站重庆云诚度网站建设

江苏省建设厅八大员考试报名网站,重庆云诚度网站建设,网页免费模板,淘宝电脑版登登录入口在寻找一种特别的方式来表达你的爱意吗#xff1f;使用Python编程#xff0c;你可以创造出独一无二的爱心图案#xff0c;为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码#xff0c;让你的创意和情感通过代码展现出来。 话不多说#xff0c;咱…在寻找一种特别的方式来表达你的爱意吗使用Python编程你可以创造出独一无二的爱心图案为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码让你的创意和情感通过代码展现出来。 话不多说咱直接上代码 目录 1. 紫色浪漫心形表白2. 爱意满满Love2 I Love You3. 红色热情心形与文字结合4. 爱的箭矢一箭穿心效果5. 一箭穿心文字版6. 爱心一行代码简洁表白 1. 紫色浪漫心形表白 #1-1导入turtle模块进行设计 import turtle import time#1-2画心形圆弧 def hart_arc():for i in range(200):turtle.right(1)turtle.forward(2)def move_pen_position(x, y):turtle.hideturtle() # 隐藏画笔先turtle.up() # 提笔turtle.goto(x, y) # 移动画笔到指定起始坐标窗口中心为0,0turtle.down() # 下笔turtle.showturtle() # 显示画笔love 听闻小姐治家有方鄙人余生愿闻其详 #input(请输入表白话语) signature 先生 #input(请签署你的名字:) date #input(请写上日期)if love :love I Love You#1-3初始化 turtle.setup(width800, height500) # 窗口画布大小 turtle.color(black, Pink) # 画笔颜色 turtle.pensize(5) # 画笔粗细 turtle.speed(100) # 描绘速度 # 初始化画笔起始坐标 move_pen_position(x0, y-180) # 移动画笔位 turtle.left(140) # 向左旋转140度turtle.begin_fill() # 标记背景填充位置#1-4画图和展示 turtle.forward(224) # 向前移动画笔长度为224 # 画爱心圆弧 hart_arc() # 左侧圆弧 turtle.left(120) # 调整画笔角度 hart_arc() # 右侧圆弧 # 画心形直线 右下方 turtle.forward(224)turtle.end_fill() # 标记背景填充结束位置move_pen_position(x70, y160) # 移动画笔位置 turtle.left(185) # 向左旋转180度 turtle.circle(-110,185) # 右侧圆弧 # 画心形直线 右下方 #turtle.left(20) # 向左旋转180度 turtle.forward(50) move_pen_position(x-180, y-180) # 移动画笔位置 turtle.left(180) # 向左旋转140度# 画心形直线 左下方 turtle.forward(600) # 向前移动画笔长度为224# 在心形中写上表白话语 move_pen_position(0,50) # 表白语位置 turtle.hideturtle() # 隐藏画笔 turtle.color(#CD5C5C, pink) # 字体颜色 # font:设定字体、尺寸电脑下存在的字体都可设置 align:中心对齐 turtle.write(love, font(Arial, 20, bold), aligncenter)# 签写署名和日期 if (signature ! ) (date ! ):turtle.color(red, pink)time.sleep(2)move_pen_position(220, -180)turtle.hideturtle() # 隐藏画笔turtle.write(signature, font(Arial, 20), aligncenter)move_pen_position(220, -220)turtle.hideturtle() # 隐藏画笔turtle.write(date, font(Arial, 20), aligncenter)#1-5点击窗口关闭程序 window turtle.Screen() window.exitonclick()2. 爱意满满Love2 I Love You import turtle as t import math as mtif __name__ __main__:t.screensize(800,600,white)t.pensize(10)t.speed(10)#爱心1t.color(black,pink)t.begin_fill()for i in range(-90,90,5):xmt.cos(mt.radians(i))yfloat(pow(mt.cos(mt.radians(i)),2/3))float(mt.sin(mt.radians(i)))t.penup()# print(int(x*50)10,int(y*50)10)t.goto(int(x*50)50,int(y*50)30)t.pendown()t.forward(1)t.penup()t.goto(-int(x*50)50,int(y*50)30)t.pendown()t.forward(1)t.penup()t.end_fill()#爱心2t.goto(0,10)t.penup()t.begin_fill()for i in range(0,360,5):r60*(1-mt.sin(mt.radians(i)))t.penup()t.left(5)t.forward(r)t.pendown()t.forward(1)t.penup()t.backward(r1)t.pendown()t.end_fill()#Lt.penup()t.goto(-200,0)t.left(90)t.begin_fill()t.pendown()t.forward(100)t.right(90)t.forward(20)t.right(90)t.forward(80)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()#ot.penup()t.goto(-80,0)t.pendown()t.begin_fill()t.circle(-50)t.end_fill()t.penup()t.color(pink,black)t.begin_fill()t.goto(-80,20)t.pendown()t.circle(-30)t.end_fill()t.color(black,pink)#Et.penup()t.goto(120, 0)t.right(180)t.left(90)t.begin_fill()t.pendown()t.forward(100)#上t.right(90)t.forward(60)#横t.right(90)t.forward(20)#竖t.right(90)t.forward(40)#横t.left(90)t.forward(20)#竖t.left(90)t.forward(40)#横t.right(90)t.forward(20)t.right(90)t.forward(40)t.left(90)t.forward(20)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()t.mainloop()3. 红色热情心形与文字结合 import turtle as tdef face(x, y): #脸t.setheading(-90)t.penup()t.goto(x, y)t.pendown()t.backward(15) # 左脸t.circle(70,-80)t.setheading(80) # 左耳t.circle(-150, 15)t.circle(-15, 180)t.setheading(-115)t.circle(-150, 13)t.setheading(10)t.circle(-100,10)t.setheading(70) # 右耳t.circle(-150, 20)t.circle(-15, 180)t.circle(-150, 16)t.setheading(10)t.setheading(160) # 右脸t.circle(60, -130)t.setheading(-75)t.forward(40)def word(x, y): # “如何骗人”t.pensize(2)t.pencolor(black)t.setheading(0)t.penup()t.goto(x, y)t.pendown()t.forward(10) # “如”t.penup()t.setheading(90)t.forward(8)t.pendown()t.setheading(-120)t.forward(15)t.setheading(-45)t.forward(12)t.penup()t.setheading(80)t.forward(15)t.pendown()t.setheading(-125)t.forward(16)t.penup()t.setheading(42)t.forward(16)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.backward(11)t.pendown()t.setheading(0)t.forward(8)t.setheading(-90)t.forward(10)t.penup()t.setheading(180)t.forward(8)t.pendown()t.setheading(0)t.forward(8)t.penup() # “何”t.goto(x7,y-18)t.pendown()t.setheading(-135)t.forward(13)t.penup()t.goto(x5, y - 20)t.pendown()t.setheading(-90)t.forward(16)t.penup()t.goto(x11, y-18)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x12, y-22)t.pendown()t.setheading(-90)t.forward(8)t.penup()t.goto(x 12, y - 22)t.pendown()t.setheading(0)t.forward(6)t.setheading(-90)t.forward(8)t.penup()t.goto(x 11, y - 31)t.pendown()t.setheading(0)t.forward(6)t.penup()t.goto(x 21, y - 19)t.pendown()t.setheading(-90)t.forward(18)t.setheading(145)t.forward(5)t.penup() # “骗”t.goto(x 40, y3)t.pendown()t.setheading(0)t.forward(10)t.setheading(-90)t.forward(7)t.penup()t.goto(x 45, y 3)t.pendown()t.setheading(-90)t.forward(10)t.setheading(0)t.forward(7)t.setheading(-100)t.forward(10)t.setheading(145)t.forward(4)t.penup()t.goto(x38, y-12)t.pendown()t.setheading(0)t.forward(11)t.penup()t.goto(x57, y9)t.pendown()t.setheading(-45)t.forward(4)t.penup()t.goto(x54, y3)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(5)t.setheading(180)t.forward(12)t.penup()t.goto(x 54, y 3)t.pendown()t.setheading(90)t.circle(90,-10)t.penup()t.goto(x 56, y-5)t.pendown()t.setheading(-90)t.forward(11)t.penup()t.goto(x 56, y - 5)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(12)t.setheading(145)t.forward(4)t.penup()t.goto(x 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x 60, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.goto(x 64, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup() # “人”t.goto(x 60, y - 19)t.pendown()t.setheading(70)t.circle(50, -30)t.penup()t.goto(x 56, y - 27)t.pendown()t.setheading(130)t.circle(-50, -20)def book(x,y): #书t.setheading(-90)t.penup()t.goto(x, y)t.fillcolor(red)t.begin_fill()t.pendown()t.forward(60)t.setheading(0)t.circle(-100, 25)t.setheading(90)t.forward(59)t.setheading(-25)t.circle(-100, -25)t.penup()t.setheading(-14)t.forward(46)t.pendown()t.setheading(15)t.circle(-100, 25)t.setheading(-90)t.forward(58)t.setheading(-11)t.circle(-105, -25)t.end_fill()def eyes(x, y): # 五官t.setheading(-20)t.penup()t.goto(x, y)t.pendown()t.forward(10)t.setheading(0)t.penup()t.forward(10)t.pendown()t.setheading(20)t.forward(10)t.setheading(-160)t.penup()t.forward(50)t.pendown()t.setheading(0)t.forward(15)t.penup()t.forward(25)t.pendown()t.forward(18)t.setheading(-145)t.penup()t.forward(45)t.pendown()t.setheading(0)t.forward(10)def cheek(x, y): #腮红t.setheading(0)for i in range(1, 4):t.color(pink)t.pensize(4)t.penup()t.right(110)t.goto(x, y)t.pendown()t.forward(9)t.left(110)x 9t.pencolor(black)def hands(x,y): # 小手手t.penup()t.goto(x, y)t.pendown()t.fillcolor(white)t.begin_fill()t.circle(10)t.end_fill()t.penup()t.setheading(5)t.forward(120)t.pendown()t.fillcolor(white)t.begin_fill()t.setheading(-165)t.forward(35)t.circle(10,180)t.forward(15)t.end_fill()def heart(x,y,z): # 爱心t.setheading(110)t.pensize(2)t.pencolor(black)t.penup()t.goto(x,y)t.pendown()t.fillcolor(red)t.begin_fill() #左半边t.circle(50,180)t.circle(180,37)t.left(46) #右半边t.circle(180,37)t.circle(50, 182)t.end_fill()def main():主函数t.pensize(0)t.speed(6)face(-95, 55)eyes(-45, 110)cheek(-80, 80)cheek(0, 80)book(-110, 55)hands(-110,5)word(-100,35)heart(150,0,1)t.hideturtle()t.exitonclick()if __name__ __main__:main()4. 爱的箭矢一箭穿心效果 import turtle as tt.color(white,red)t.begin_fill()t.width(5)t.left(135)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.pu()t.goto(50,-30)t.pd()t.right(90)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.end_fill()t.hideturtle()t.pu()t.goto(250,-70)t.pd()t.color(black)t.width(5)t.left(70)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.width(3)t.fd(220)t.right(90)t.pu()t.fd(10)t.pd()t.left(90)t.circle(10,180)t.circle(10,-90)t.right(90)t.fd(-10)t.pu()t.fd(90)t.left(90)t.fd(10)t.left(90)t.pd()t.circle(10,180)t.circle(10,-90)t.left(90)t.fd(100)t.begin_fill()t.left(30)t.fd(15)t.right(35)t.fd(50)t.right(150)t.fd(50)t.right(62)t.fd(25)t.end_fill()t.done()5. 一箭穿心文字版 from turtle import * import turtle from tkinter import * import subprocess import os import random as randef Circlemove(size):for i in range(200):right(1)forward(1 * size)def Heart(x, y, size):setturtle(x, y)speed(0.6)color(red, pink)begin_fill()left(140)forward(111.65 * size)Circlemove(size)left(120)Circlemove(size)forward(111.65 * size)end_fill()penup()def setturtle(x, y):penup()goto(x, y)pendown()def Line():speed(0.6)pensize(10)setheading(0)setturtle(-300, 0)left(12)forward(210)setturtle(80, 80)forward(150)def LineHead():pensize(1)speed(0.5)color(red, red)begin_fill()left(120)forward(20)right(150)forward(35)right(120)forward(35)right(150)forward(20)end_fill()def SavePicture():ts getscreen()ts.getcanvas().postscript(file520.ps, colormodecolor)window turtle.Screen()window.exitonclick()def main():Love_Words [我喜欢的样子你都有。]Love_Letter [有你陪伴的日子真好。, 遇见你此生甚幸。]Random_Number ran.randint(0, len(Love_Words) - 1)setup(800, 600, 0, 0)getscreen().tracer(30, 0)hideturtle()pensize(3)color(black, pink)Heart(0, -25, 0.75)home()Heart(-80, -50, 1)Line()LineHead()pencolor(purple)speed(0.6)j 0for i in Love_Words[Random_Number]:j j 1setturtle(j * 25 - 250, -150 ran.randint(-1, 1) * 7)write(i, font(楷体, 25, normal))j 0pencolor(purple)for i in Love_Letter:j j 1setturtle(-400, 275 - j * 27)write(i, font(楷体, 25, normal))pencolor(black)SavePicture()if __name__ __main__:main()6. 爱心一行代码简洁表白 print(\n.join([.join([(Love[(x-y) % len(Love)] if ((x*0.05)**2(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 0 else ) for x in range(-30, 30)]) for y in range(30, -30, -1)]))源码资料获取 · 技术与交流
http://www.w-s-a.com/news/734629/

相关文章:

  • wordpress福利网站源码高端网站设计培训机构
  • 网站建设找客户招标网免费
  • 东莞食品网站建设扬州市住房建设局网站
  • 网站色彩心理建设网站的主要功能有哪些
  • 营销型网站建设运营企业宣传网页设计
  • 建设银行官方网站网址sem搜索
  • 简述建设网站的具体步骤网络建设方案ppt
  • 自建门户网站建设工程质量监理协会网站
  • 为企网站版面设计经历了哪几个阶段
  • 如何直到网站是用什么模板做的怎么在外贸公司拿订单
  • 网站专题制作酒店网站建设考虑的因素
  • 苏州招聘网站建设潍坊网站建设wfxtseo
  • 手机网站特效做互联网平台要多少钱
  • 做网站广告推广平台旅游网站后台管理系统
  • ppt模板下载免费素材网站php网站开发平台下载
  • 网站推广策划报告航空航天可以做游戏可以视频约会的网站
  • 云南建设学院的网站划分切片来做网站
  • 建设视频网站需要什么知识辽阳建设网站
  • 提供o2o网站建设打扑克网站推广软件
  • 制作简单门户网站步骤中国建设局网站查询
  • 漳州专业网站建设网站建设的面试要求
  • 有哪些网站是封面型汕头网站上排名
  • 自动优化网站软件没有了做的新网站做百度推广怎么弄
  • 高陵县建设局网站商标查询网站
  • 郑州建设网站哪家好东莞网络公司排行榜
  • 成都网站开发费用做行程的网站
  • 做地铁建设的公司网站手机网站首页布局设计
  • 福建亨立建设集团有限公司网站搜狗网页游戏大厅
  • 设计网站musil访问量大的网站选择多少流量的服务器何时
  • 公司网站包括哪些内容新网站怎样做外链