给你一面国旗 教你用python画中国国旗


Posted in Python onSeptember 24, 2019

本文实例为大家分享了python画中国国旗的具体代码,供大家参考,具体内容如下

# author : momo
import turtle
#中国国旗
turtle.up()
turtle.goto(-200,200)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("red")
turtle.pencolor("red")
for i in range(2):
 turtle.forward(280)
 turtle.right(90)
 turtle.forward(200)
 turtle.right(90)
turtle.end_fill()
 
turtle.up()
turtle.goto(-170,145)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("yellow")
turtle.pencolor("yellow")
for x in range(5):
 turtle.forward(50)
 turtle.right(144)
turtle.end_fill()
 
turtle.up()
turtle.goto(-100,180)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("yellow")
turtle.pencolor("yellow")
for x in range(5):
 turtle.forward(20)
 turtle.right(144)
turtle.end_fill()
 
turtle.up()
turtle.goto(-70,160)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("yellow")
turtle.pencolor("yellow")
for x in range(5):
 turtle.forward(20)
 turtle.right(144)
turtle.end_fill()
 
turtle.up()
turtle.goto(-70,120)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("yellow")
turtle.pencolor("yellow")
for x in range(5):
 turtle.forward(20)
 turtle.right(144)
turtle.end_fill()
 
turtle.up()
turtle.goto(-100,100)
turtle.down()
turtle.begin_fill()
turtle.fillcolor("yellow")
turtle.pencolor("yellow")
for x in range(5):
 turtle.forward(20)
 turtle.right(144)
turtle.end_fill()
 
 
turtle.hideturtle()#隐藏小海龟
#维持面板
turtle.done()

给你一面国旗 教你用python画中国国旗

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。

Python 相关文章推荐
python操作mongodb根据_id查询数据的实现方法
May 20 Python
使用Python中的tkinter模块作图的方法
Feb 07 Python
Python生成随机密码的方法
Jun 16 Python
Python输出由1,2,3,4组成的互不相同且无重复的三位数
Feb 01 Python
python版本的仿windows计划任务工具
Apr 30 Python
深入浅析Python的类
Jun 22 Python
python3读取excel文件只提取某些行某些列的值方法
Jul 10 Python
python RabbitMQ 使用详细介绍(小结)
Nov 08 Python
python用plt画图时,cmp设置方法
Dec 13 Python
Laravel+Dingo/Api 自定义响应的实现
Feb 17 Python
Python实现读取并写入Excel文件过程解析
May 27 Python
详解Python 循环嵌套
Jul 09 Python
Python MongoDB 插入数据时已存在则不执行,不存在则插入的解决方法
Sep 24 #Python
Python获取时间戳代码实例
Sep 24 #Python
Python django框架输入汉字,数字,字符生成二维码实现详解
Sep 24 #Python
分享一个pycharm专业版安装的永久使用方法
Sep 24 #Python
python实现的config文件读写功能示例
Sep 24 #Python
python使用socket实现的传输demo示例【基于TCP协议】
Sep 24 #Python
pymysql 开启调试模式的实现
Sep 24 #Python
You might like
社区(php&&mysql)三
2006/10/09 PHP
zen_cart实现支付前生成订单的方法
2016/05/06 PHP
PHP定时任务获取微信access_token的方法
2016/10/10 PHP
iis6+javascript Add an Extension File
2007/06/13 Javascript
JavaScript入门教程(8) Location地址对象
2009/01/31 Javascript
jQuery UI AutoComplete 使用说明
2011/06/20 Javascript
使用非html5实现js板连连看游戏示例代码
2013/09/22 Javascript
js闭包实现按秒计数
2015/04/23 Javascript
深入分析jsonp协议原理
2015/09/26 Javascript
简单掌握JavaScript中const声明常量与变量的用法
2016/05/21 Javascript
JS简单设置下拉选择框默认值的方法
2016/08/20 Javascript
清除js缓存的多种方法总结
2016/12/09 Javascript
Javascript中call,apply,bind方法的详解与总结
2016/12/12 Javascript
使用bootstrap-paginator.js 分页来进行ajax 异步分页请求示例
2017/03/09 Javascript
详解用Node.js实现Restful风格webservice
2017/09/29 Javascript
vue中mint-ui的使用方法
2018/04/04 Javascript
vue中如何实现pdf文件预览的方法
2018/07/12 Javascript
详解vue通过NGINX部署在子目录或者二级目录实践
2018/09/03 Javascript
分享5个顶级的JavaScript Ajax组件库
2018/09/16 Javascript
微信小程序bindinput与bindsubmit的区别实例分析
2019/04/17 Javascript
JS常见内存泄漏及解决方案解析
2020/05/30 Javascript
[46:57]EG vs Winstrike 2018国际邀请赛小组赛BO2 第二场 8.18
2018/08/19 DOTA
Python Mysql自动备份脚本
2008/07/14 Python
Python生成器以及应用实例解析
2018/02/08 Python
python如何实现视频转代码视频
2019/06/17 Python
pandas的qcut()方法详解
2019/07/06 Python
Python通过yagmail实现发送邮件代码解析
2020/10/27 Python
使用Python webdriver图书馆抢座自动预约的正确方法
2021/03/04 Python
英国领先的名牌服装折扣零售商:Brown Bag Clothing
2019/01/08 全球购物
EJB与JAVA BEAN的区别
2016/08/29 面试题
Java程序员面试题
2016/09/27 面试题
十佳大学生村官事迹
2014/01/09 职场文书
爱岗敬业演讲稿
2014/05/05 职场文书
宪法宣传周工作方案
2014/05/26 职场文书
2014年精神文明建设工作总结
2014/11/19 职场文书
基于docker安装zabbix的详细教程
2022/06/05 Servers