画帕恰狗python代码
时间: 2023-11-09 14:00:51 浏览: 264
帕恰狗.py..py
以下是画帕恰狗的 Python 代码:
```python
import turtle
# 画头
turtle.penup()
turtle.goto(0, -100)
turtle.pendown()
turtle.circle(100)
# 画左耳朵
turtle.penup()
turtle.goto(-70, 40)
turtle.pendown()
turtle.setheading(-60)
turtle.circle(80, 120)
# 画右耳朵
turtle.penup()
turtle.goto(70, 40)
turtle.pendown()
turtle.setheading(60)
turtle.circle(-80, 120)
# 画左眼
turtle.penup()
turtle.goto(-40, 120)
turtle.pendown()
turtle.fillcolor("white")
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
# 画右眼
turtle.penup()
turtle.goto(40, 120)
turtle.pendown()
turtle.fillcolor("white")
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
# 画左眼珠
turtle.penup()
turtle.goto(-30, 130)
turtle.pendown()
turtle.fillcolor("black")
turtle.begin_fill()
turtle.circle(10)
turtle.end_fill()
# 画右眼珠
turtle.penup()
turtle.goto(50, 130)
turtle.pendown()
turtle.fillcolor("black")
turtle.begin_fill()
turtle.circle(10)
turtle.end_fill()
# 画鼻子
turtle.penup()
turtle.goto(0, 80)
turtle.pendown()
turtle.setheading(270)
turtle.fillcolor("black")
turtle.begin_fill()
turtle.circle(20, 180)
turtle.end_fill()
# 画嘴巴
turtle.penup()
turtle.goto(-60, 20)
turtle.pendown()
turtle.setheading(-27)
turtle.circle(70, 55)
# 完成
turtle.done()
```
阅读全文