python海龟绘图画熊二
时间: 2023-12-16 17:28:11 浏览: 225
以下是用Python海龟绘图画熊二的代码:
```python
import turtle
# 设置画笔颜色和填充颜色
turtle.color('black', 'yellow')
# 开始绘制熊二的头部
turtle.begin_fill()
turtle.circle(100)
turtle.end_fill()
# 绘制熊二的左耳朵
turtle.penup()
turtle.goto(-50, 200)
turtle.pendown()
turtle.color('black', 'pink')
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 绘制熊二的右耳朵
turtle.penup()
turtle.goto(50, 200)
turtle.pendown()
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 绘制熊二的左眼睛
turtle.penup()
turtle.goto(-70, 100)
turtle.pendown()
turtle.color('black', 'white')
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
# 绘制熊二的右眼睛
turtle.penup()
turtle.goto(70, 100)
turtle.pendown()
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
# 绘制熊二的左眼珠
turtle.penup()
turtle.goto(-60, 110)
turtle.pendown()
turtle.color('black', 'black')
turtle.begin_fill()
turtle.circle(10)
turtle.end_fill()
# 绘制熊二的右眼珠
turtle.penup()
turtle.goto(80, 110)
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.end_fill()
# 绘制熊二的鼻子
turtle.penup()
turtle.goto(0, 50)
turtle.pendown()
turtle.color('black', 'black')
turtle.begin_fill()
turtle.circle(30)
turtle.end_fill()
# 绘制熊二的嘴巴
turtle.penup()
turtle.goto(0, 20)
turtle.pendown()
turtle.color('black', 'white')
turtle.begin_fill()
turtle.circle(50, 180)
turtle.end_fill()
# 绘制熊二的身体
turtle.penup()
turtle.goto(0, -100)
turtle.pendown()
turtle.color('black', 'yellow')
turtle.begin_fill()
turtle.circle(150)
turtle.end_fill()
# 绘制熊二的左手
turtle.penup()
turtle.goto(-150, -100)
turtle.pendown()
turtle.color('black', 'pink')
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 绘制熊二的右手
turtle.penup()
turtle.goto(150, -100)
turtle.pendown()
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 绘制熊二的左脚
turtle.penup()
turtle.goto(-70, -250)
turtle.pendown()
turtle.color('black', 'pink')
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 绘制熊二的右脚
turtle.penup()
turtle.goto(70, -250)
turtle.pendown()
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
# 隐藏海龟
turtle.hideturtle()
# 完成绘制
turtle.done()
```
阅读全文