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

python 画风车

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

python 画风车

from turtle import *
for i in range(4):
    fd(100)
    rt(90)
    circle(-100,45)
    goto(0,0)
    lt(45)    
done()

# -*- coding: utf-8 -*-
"""
Created on Fri Nov  5 09:39:06 2021

@author: SBM
"""
from turtle import *
from random import random
rt(22.5)
for i in range(4):
    fillcolor(random(),random(),random())  #填充颜色
    begin_fill()    #填充开始
    fd(100)
    rt(90)    
    circle(-100,45)
    goto(0,0)
    end_fill()      #填充结束
    lt(45)
width(5)
goto(0,-200)
done()

from turtle import *
import time
setup(1024,768)
rt(90)
for i in range(8):
    fd(100)
    lt(90)
    circle(-100,45)
    goto(0,0)
    rt(90)   
done()

 

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

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

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