python画安卓小人

#!/usr/bin/env python
import turtle
aj=turtle.Pen()
y=0
aj.speed(5)
#turtle.screensize(200,800)
turtle.bgcolor("black")
#aj.shape("turtle")
def head():
    aj.color("green")
    aj.fd(160)
    x=aj.xcor()
    aj.seth(90)
    aj.begin_fill()
    #aj.color("green")
    aj.circle(x/2,180)
    aj.end_fill()
    aj.penup()
    aj.goto(33,37)
    aj.pendown()
    aj.dot(13,"black")
    aj.penup()
    aj.goto(126,37)
    aj.pendown()
    aj.dot(13,"black")
    aj.penup()
    aj.home()
    aj.pendown()
    aj.hideturtle()
    aj.fd(160)
    aj.seth(90)
    aj.circle(x/2,60)
    aj.right(90)
    aj.pensize(5)
    aj.fd(30)
 
    aj.penup()
    aj.home()
    #aj.pendown()
    aj.hideturtle()
    aj.fd(160)
    aj.seth(90)
    aj.circle(x/2,120)
    aj.right(90)
    aj.pensize(5)
    aj.pendown()
    aj.fd(30)
    aj.penup()
    aj.home()
    aj.penup()
 
def body():
    aj.pensize(0)
 
    aj.home()
    aj.showturtle()
    aj.goto(0,-7)
    aj.pendown()
    aj.begin_fill()
    aj.fd(160)
    aj.right(90)
    aj.fd(120)
    aj.right(90)
    aj.fd(160)
    y=aj.ycor()
    aj.right(90)
    aj.fd(120)
    aj.end_fill()
 
def legs():
    aj.penup()
    #turtle.color("red")
    aj.goto(33,-169)
    aj.pendown()
    aj.pensize(32)
    aj.fd(43)
    aj.penup()
    aj.goto(130,-169)
    aj.pendown()
    aj.fd(43)
    aj.penup()
 
def hands():
    aj.home()
    aj.pensize(30)
    aj.goto(-18,-77)
    aj.pendown()
    aj.left(90)
    aj.fd(65)
    aj.penup()
    aj.goto(179,-77)
    aj.pendown()
    aj.fd(65)
    aj.penup()
    aj.hideturtle
    aj.fd(100)
    aj.hideturtle()
    aj.circle(100)
    aj.circle(100,360,59)
    aj.reset()
    turtle.bgcolor("black")
    turtle.pencolor("green")
    turtle.hideturtle()
    turtle.goto(-300,0)
    aj.hideturtle
    turtle.write("Thank you for watching....", font = ("Bodoni MT Black", 28, "bold"))
    turtle.penup()
    turtle.goto(-40,-170)
    turtle.pendown()
    turtle.pencolor("yellow")
    turtle.write("Developed by 一个超会写Bug的安太狼", font = ("Palatino Linotype", 22, "bold"))
 
head()
body()
legs()
hands()
turtle.done()

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值