Python---turtle模块---日本国旗的绘画
2019-04-09 11:54
603 查看
版权声明:如需请赋本文章链接https://me.csdn.net/guoyihaoguoyihao https://blog.csdn.net/guoyihaoguoyihao/article/details/89141501
(本篇博主自己编写,如有帮助,甚是荣幸!!)
#-*-coding:utf-8--*- Python--日本国旗Python--日本国旗Python--日本国旗Python--日本国旗Python--日本国旗Python--日本国旗Python--日本国旗Python--日本国旗 #Japan(RiBen) import turtle import math def draw_circle(aTurtle): aTurtle.begin_fill() aTurtle.fillcolor('red') aTurtle.penup() aTurtle.goto(5,-100) aTurtle.pendown() aTurtle.begin_fill() aTurtle.fillcolor('red') aTurtle.circle(100,360) aTurtle.end_fill() def draw_qi(times=20.0): width, height = 30*times, 20*times window = turtle.Screen() aTurtle = turtle.Turtle() aTurtle.hideturtle() aTurtle.speed(10) aTurtle.penup() aTurtle.goto(-width/2, height/2) aTurtle.pendown() aTurtle.begin_fill() aTurtle.fillcolor('white') aTurtle.fd(width) aTurtle.right(90) aTurtle.fd(height) aTurtle.right(90) aTurtle.fd(width) aTurtle.right(90) aTurtle.fd(height) aTurtle.right(90) aTurtle.end_fill() draw_circle(aTurtle) window.exitonclick() if __name__=='__main__': draw_qi()
(如有更好代码请一定指教!如有不懂,留言有空必答!!)
相关文章推荐
- Python---turtle模块---美国国旗的绘画
- Python---turtle模块---瑞士国旗的绘画
- 用Python的turtle模块画国旗
- python入门外传turtle模块绘图
- python的turtle模块画折线图
- python 使用turtle画国旗
- Python——用turtle模块画海龟的第一步
- Python turtle 模块函数笔记
- python小笔记-turtle模块绘图
- Python学习笔记四(turtle模块画图练习)
- python中turtle(海龟)模块的简单用法
- python中turtle模块之画个小汽车
- python学习-turtle模块(二)
- 用python的turtle模块给女票画个小心心
- 用python的turtal模块画一个美国国旗
- 【16】python使用turtle库绘画
- python中turtle模块画没有角的方格
- 使用Python的turtle模块画图的方法
- python学习-turtle模块(一)
- python中turtle模块画正多边形