⽤pythonturtle画棒棒糖源代码_Python使⽤turtle绘制海绵宝宝
源代码,画,源码
from turtle import *
def go_to(x, y):
penup()
goto(x, y)
pendown()
def help_do():
go_to(-400, 0)
forward(800)
go_to(-400, 100)
forward(800)
go_to(-400,200)
forward(800)
go_to(-400, -100)
forward(800)
go_to(-400, -200)
forward(800)
left(90)
go_to(0,-300)登陆界面下载
forward(600)
go_to(100, -300)
forward(600)
go_to(-100, -300)
forward(600)
go_to(-200, -300)
forward(600)
go_to(200, -300)
forward(600)
def head():
go_to(-200, 180)
fillcolor('yellow')
for _ in range(6): circle(36, 60) circle(-36, 60) seth(-125)
for _ in range(5): circle(40,60) circle(-40,60) seth(-210)
for _ in range(4): circle(45,60) circle(-45,60) seth(65)
for _ in range(5): circle(40,60) circle(-40,60)
end_fill()
def eye():
# 眼⽩
go_to(14, -5) fillcolor('#f0f0f0') begin_fill()
circle(65, 360) end_fill()
begin_fill()
go_to(13,12)
seth(98)
circle(-65,360) end_fill()
#眼球
go_to(-10,20) fillcolor('blue') begin_fill()
go_to(-22,20) fillcolor('black') begin_fill() circle(7,360) end_fill()
go_to(40,15) fillcolor('blue') begin_fill() circle(-20, 360) end_fill()
go_to(53,15) fillcolor('black') begin_fill() circle(-7,360) end_fill()
#睫⽑
go_to(-95,65) left(20)二进制计算方法举例
forward(40)
go_to(-50,87) right(25) forward(32)
go_to(0,70) right(25) forward(40)
go_to(40, 75) left(35)
forward(40)
go_to(90, 87) right(18) forward(30)
go_to(120, 70)
def nose(): fillcolor('yellow') go_to(0, -7) begin_fill()教鞭鼠标指针样式
right(50)
circle(-60, 30) color('yellow') goto(15,-40)
end_fill()
color('black')
go_to(0, -7)
seth(-75)
forward(30)
go_to(30,-7)
seth(-105) forward(30)
def mouth():
go_to(-120, - 60) seth(-45)
circle(200, 30) seth(0)
forward(100) seth(15)
python代码画图案circle(200, 30) def tooth():
go_to(-30,-114) seth(-95)
fillcolor('white') begin_fill() forward(30)
seth(0)
forward(40)
go_to(-30,-114)
end_fill()
go_to(30, -114)
seth(-95)
fillcolor('white')
begin_fill()
forward(30)
seth(0)
forward(40)
seth(95)
forward(30)
go_to(60, -114)
end_fill()
def hole():
go_to(-160,160)
# fillcolor('#ffd700')
# begin_fill()
circle(30, 360)
# a=1
# for i in range(120):
# if 0<=i<30 or 60<=i<90: # a=a+0.2
# lt(3)
perl可以做什么程序# forward(a)
# else:
# a=a-0.2
# lt(3)
# forward(a)
# end_fill()
def face():sql入门百度云
eye()
nose()
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论