Python画熊头像

用python3画了一只丑熊


```python3
# bear
import turtle as t

# 脸

t.pensize(2)
t.color('yellow')
t.pencolor("black")
t.begin_fill()
t.circle(40,360)

# 右耳朵
t.circle(40,135)
t.left(-90)
t.circle(10, 200)
t.end_fill()

# 左耳朵
t.penup()
t.goto(0,0)
t.seth(0)
t.pendown()
t.circle(40,225)
t.begin_fill()
t.right(90)
t.circle(-10, 200)
t.end_fill()

# 右眼睛框
t.penup()
t.goto(0,0)
t.seth(0)
t.left(90)
t.fd(50)
t.right(90)
t.fd(10)
t.pendown()
t.begin_fill()
t.circle(7, 360)
t.end_fill()

# 右眼睛瞳孔
t.penup()
t.left(90)
t.fd(5.5)
t.right(90)
t.fd(2)
t.left(-90)
t.pendown()
t.color('black')
t.begin_fill()
t.circle(-3,360)
t.end_fill()


# 左眼眶
t.color('yellow')
t.pencolor("black")
t.penup()
t.goto(0,0)
t.seth(0)
t.left(90)
t.fd(50)
t.left(90)
t.fd(10)
t.pendown()
t.begin_fill()
t.circle(-7, 360)
t.end_fill()

# 左眼睛瞳孔
t.penup()
t.left(90)
t.fd(-5.5)
t.right(90)
t.fd(2)
t.left(-90)
t.pendown()
t.color('black')
t.begin_fill()
t.circle(-3,360)
t.end_fill()

# 鼻子

t.penup()
t.goto(0,0)
t.seth(0)
t.left(90)
t.fd(35)
t.right(90)
t.pendown()
t.begin_fill()
t.circle(5,360)
t.end_fill()

# 嘴巴

t.penup()
t.goto(0,0)
t.seth(0)
t.left(90)
t.fd(20)
t.right(90)
t.fd(-10)
t.right(90)
t.pendown()
t.begin_fill()
t.circle(10,180)
t.end_fill()



t.hideturtle()

t.done()

``

全部评论

相关推荐

Java抽象带篮子:投java岗就写java,真别写c,c++,python,css了,进去让你搞这些你又不乐意
点赞 评论 收藏
分享
09-28 22:01
已编辑
广西科技大学 IT技术支持
合适才能收到offe...:找桌面运维?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务