2018-11-24 python蟒蛇画图

2018-11-24  本文已影响0人  子小亦大

python蟒蛇画图

#DrawPython.py

import turtle

turtle.setup(650, 350, 200, 200)

turtle.penup()

turtle.fd(-250)

turtle.pendown()

turtle.pensize(25)

turtle.pencolor("red")

turtle.seth(-40)

for i in range(4):

    turtle.circle(40, 80)

    turtle.circle(-40, 80)

turtle.circle(40, 80/2)

turtle.fd(40)

turtle.circle(16, 180)

turtle.fd(40 * 2/3)

turtle.done()

上一篇下一篇

猜你喜欢

热点阅读