用python画一个小鹿,并给出代码
时间: 2023-03-13 15:46:26 浏览: 529
我可以提供一个python程序来画一只小鹿:import turtle
# create screen
screen = turtle.Screen()
# create turtle
deer = turtle.Turtle()
# draw body
deer.forward(100)
deer.right(90)
deer.right(30)
deer.forward(30)
deer.left(60)
deer.forward(30)
deer.right(30)
deer.forward(100)
deer.right(90)
deer.circle(20,180)
# draw legs
deer.right(90)
deer.forward(20)
deer.left(45)
deer.forward(25)
deer.backward(25)
deer.right(90)
deer.forward(25)
deer.backward(25)
deer.left(45)
deer.forward(20)
# draw head
deer.right(90)
deer.circle(20,180)
# draw antlers
deer.left(90)
deer.forward(15)
deer.left(90)
deer.forward(15)
deer.backward(30)
deer.right(90)
deer.forward(15)
deer.backward(30)
screen.exitonclick()
阅读全文