大家好,今天我们要分享,python可以自学吗需要什么基础 python零基础能学吗 知乎,一起探索吧!
from turtle import *
from time import sleep
w = 800
h = 800
setup(w, h, 631, 44)
bgcolor('#08203D')
def pen_goto(a, b):
up()
goto(a, b)
down()
def ref_line():
pencolor('Grey')
pensize(1)
speed(0)
sq = 50
dot(10, 'Gold')
row_y = h/2
for i in range(int(h/sq - 1)):
row_y -= sq
pen_goto(- w/2, row_y)
fd(w)
seth(90)
col_x = w/2
for i in range(int(w/sq - 1)):
col_x -= sq
pen_goto(col_x, - w/2)
fd(h)
seth(0)
def head():
pen_goto(0, 0)
setheading(0)
up()
circle(160, 40)
begin_fill()
down()
circle(160, 280)
fillcolor('#00a0de')
end_fill()
def scarf():
begin_fill()
fillcolor('red')
seth(0)
fd(215)
circle(-5, 90)
fd(15)
circle(-5, 90)
fd(225)
circle(-5, 90)
fd(15)
circle(-5, 90)
fd(10)
end_fill()
def face():
begin_fill(
原文地址1:https://blog.csdn.net/2301_76183299/article/details/132538148 参考资料:python中用turtle画一个圆形 https://blog.csdn.net/SXIAOYAN_/article/details/140061099
|