turtle画图代码大全

  • A+
所属分类:百科知识

2.小蟒蛇

import turtle
turtle.penup()
turtle.pencolor("blue")
turtle.forward(-200)
turtle.pendown()
turtle.pensize(10)
turtle.right(45)
for i in range(4):
    turtle.circle(40, 100)
    turtle.circle(-40, 60)
turtle.circle(40, 80 / 2)
turtle.fd(30)
turtle.circle(16, 150)
turtle.fd(100)
turtle.done()

turtle画图代码大全

历史上的今天:

发表评论

您必须登录才能发表评论!