Python绘制五星红旗,什么的五星红旗,# -*- codi
Python绘制五星红旗,什么的五星红旗,# -*- codi
# -*- coding: UTF-8 -*-from turtle import *def mygoto(x,y): up() goto(x,y) down()def draw(z): begin_fill() for i in range(5): forward(z) right(144) end_fill()setup(700, 500, 0, 0)color("yellow")bgcolor("red")fillcolor("yellow")hideturtle()mygoto(-300,150)draw(100)for i in range(4): x=1; if i in [0,3]: x=0; mygoto(-210+x*50,205-i*50) left(0-i*10) draw(30)mygoto(0,0)hideturtle()done()
运行结果:
Python绘制五星红旗
相关内容
- python打造seo必备工具-自动查询排名,pythonseo, 因为工作
- python语句结构(if判断语句),,一、python语句
- Python安装numpy模块及pycharm配置,,查看Python版本
- 【Python】使用Python进行主成分分析,,使用sklearn库
- 三、python之文件的处理,python能处理什么文件,1、文件
- python 序列化,python序列化对象的函数,序列化 1、
- 数据标准化 (data normalization) 的原理及实现 (Python sklea
- python二进制转换,python将十进制转为二进制,题目描述:
- 一:python (int & str 的方法),python的int,1.变量:
- python - pptx,pythonpptx,from pptx
评论关闭