栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

python海龟画图(8)美国队长盾牌

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

python海龟画图(8)美国队长盾牌


import turtle as t
import math
t.speed(10)
def yuan(r1,c,x,y):
    t.pu()
    t.goto(x,y)
    t.pd()
    t.pencolor(c)
    t.fillcolor(c)
    t.begin_fill()
    t.circle(r1)
    t.end_fill()
def wjx(r2):
    t.pencolor("white")
    t.pu()
    t.goto(0,r2)
    t.seth(252)
    t.pd()
    t.fillcolor("white")
    t.begin_fill()
    for i in range(5):
        t.fd(2 * r2 * math.cos(math.radians(18)))
        t.lt(144)
    t.end_fill()
yuan(300,"red2",0,-300)
yuan(250,"white",0,-250)
yuan(200,"red2",0,-200)
yuan(150,"blue",0,-150)
wjx(150)
t.ht()
t.exitonclick()

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/423777.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号