Python基础(红旗)
Posted 阿毛QAQ
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python基础(红旗)相关的知识,希望对你有一定的参考价值。
# -*- coding: UTF-8 -*- # -*- author: yjw -*- import turtle from turtle import * setup(800,600) color("yellow") fillcolor("yellow") bgcolor("red") def mygoto(x,y): up() goto(x,y) down() def drawstarFW(x): begin_fill() for i in range(5): forward(x) right(144) end_fill() def drawstarRight(x): begin_fill() for i in range(5): forward(30) right(x) end_fill() def drawstarLeft(x): begin_fill() for i in range(5): forward(30) left(x) end_fill() mygoto(-330,180) drawstarFW(100) mygoto(-210,220) drawstarLeft(144) mygoto(-180,180) drawstarLeft(144) mygoto(-190,140) drawstarRight(144) mygoto(-220,90) drawstarLeft(144) done()
以上是关于Python基础(红旗)的主要内容,如果未能解决你的问题,请参考以下文章