使用Python的turtle库来绘制冰墩墩的代码如下:
```python
import turtle
设置画布大小和背景颜色
turtle.setup(800, 800)
turtle.bgcolor("white")
设置画笔速度和颜色
turtle.speed(10)
turtle.pencolor("lightgray")
turtle.pensize(3)
绘制头部和身体轮廓
turtle.penup()
turtle.goto(-73, 230)
turtle.pendown()
turtle.setheading(20)
turtle.circle(-250, 35)
绘制左耳
turtle.setheading(50)
turtle.circle(-42, 180)
绘制左侧轮廓
turtle.setheading(-50)
turtle.circle(-190, 30)
turtle.circle(-320, 45)
绘制左腿
turtle.circle(120, 30)
turtle.circle(200, 12)
turtle.circle(-18, 85)
turtle.circle(-180, 23)
turtle.circle(-20, 110)
绘制右手
turtle.penup()
turtle.goto(73, 230)
turtle.pendown()
turtle.setheading(160)
turtle.circle(250, 35)
绘制右耳
turtle.setheading(150)
turtle.circle(42, 180)
绘制右侧轮廓
turtle.setheading(150)
turtle.circle(190, 30)
turtle.circle(320, 45)
绘制右腿
turtle.circle(120, 30)
turtle.circle(200, 12)
turtle.circle(18, 85)
turtle.circle(180, 23)
turtle.circle(20, 110)
隐藏画笔
turtle.hideturtle()
结束绘制
turtle.done()
```
这段代码首先导入了turtle库,然后设置了画布的大小和背景颜色,以及画笔的速度和颜色。接着,代码通过一系列的`goto()`和`circle()`函数来绘制冰墩墩的头部、身体、左右耳和左右腿。最后,使用`hideturtle()`函数隐藏了画笔,并通过`done()`函数结束绘制。