丑丑的哆啦A梦

在这里插入图片描述

import turtle as t
#导入模块


t.showturtle()
#展示箭头

t.penup()
#抬笔

t.goto(0,-100)
#移动到坐标

t.pendown()
#落笔

t.color("#000")
#线条颜色

t.fillcolor("#1e90ff")
#定义形状颜色

t.begin_fill()
#开始填色

t.circle(180)
#画圆

t.end_fill()
#结束填色

t.penup()
#抬笔

t.goto(0,-90)
#移动到坐标

t.pendown()
#落笔

t.color("#000")
#线条颜色

t.fillcolor("#FFFFFF")
#定义形状颜色

t.begin_fill()
#开始填色

t.circle(150)
#画圆

t.end_fill()
#结束填色

t.penup()
t.goto(-50,60)
t.pendown()
t.circle(30)
t.penup()
t.goto(-40,70)
t.pendown()
t.fillcolor("#000")
t.begin_fill()
t.circle(20)
t.end_fill()
#以上是左眼睛
t.penup()
t.goto(50,60)
t.pendown()
t.circle(30)
t.penup()
t.goto(40,70)
t.pendown()
t.fillcolor("#000")
t.begin_fill()
t.circle(20)
t.end_fill()
#以上是右眼睛

t.penup()
t.goto(-30,30)
t.pendown()
t.goto(-100,50)

t.penup()
t.goto(-30,10)
t.pendown()
t.goto(-100,10)

t.penup()
t.goto(-30,-10)
t.pendown()
t.goto(-100,-30)
#以上是左胡子

t.penup()
t.goto(30,30)
t.pendown()
t.goto(100,50)

t.penup()
t.goto(30,10)
t.pendown()
t.goto(100,10)

t.penup()
t.goto(30,-10)
t.pendown()
t.goto(100,-30)
#以上是右胡子

t.penup()
t.goto(0,50)
t.pendown()
t.width(5)
t.right(90)
t.forward(100)
t.penup()
t.goto(-56,-30)
t.pendown()
t.left(45)
t.circle(80,90)

t.right(45)
t.penup()
t.goto(0,45)
t.width(1)
t.pendown()
t.fillcolor("red")
t.begin_fill()
t.circle(10)
t.end_fill()

t.penup()
t.goto(0,53)
t.width(1)
t.color("#fff")
t.pendown()
t.fillcolor("#fff")
t.begin_fill()
t.circle(3)
t.end_fill()
#以上是嘴巴部分

t.penup()
t.goto(300,300)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值