欢迎光临散文网 会员登陆 & 注册

uyfytfthfdytdtyfd

2023-03-28 14:58 作者:Xiaonap  | 我要投稿

from turtle import *

setup(500,500)

screensize(400,400)

pu()

speed(10)

goto(5,-15)

write((0,0))

goto(150,150)

write('第1象限')

goto(150,-150)

write('第4象限')

goto(-150,-150)

write('第3象限')

goto(-150,150)

write('第2象限')

goto(-180,0)

pd()

goto(180,0)

stamp()

pu()

goto(170,5)

write('X轴')

pu()

goto(0,-150)

pd()

goto(0,150)

left(90)

stamp()

pu()

goto(5,140)

write('Y轴')

begin_fill()

color('red')

fillcolor('yellow')

goto(-50,50)

pd()

circle(50)

end_fill()

pu()

color('green')

fillcolor('blue')

begin_fill()

goto(-50,0)

pd()

goto(-50,-100)

left(60)

pd()

fd(100)

goto(-50,0)

end_fill()

pu()

goto(50,0)

pd()

begin_fill()

color('black')

fillcolor('gray')

goto(50,-100)

goto(150,-100)

goto(150,0)

goto(50,0)

end_fill()

pu()

goto(150,50)

left(-60)

pd()

numbers=['yellow','blue']

m=[0,1]

o=50

n=0

while o>10:

    n=(n+1)%2

    begin_fill()

    fillcolor(numbers[n])

    circle(o)

    end_fill()

    o-=10

uyfytfthfdytdtyfd的评论 (共 条)

分享到微博请遵守国家法律