码迷,mamicode.com
首页 > 其他好文 > 详细

第一次作业

时间:2018-03-28 20:21:27      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:circle   yellow   post   tle   gpo   let   pos   log   from   

蟒蛇
from
turtle import * setup(800,800,200,200) penup() fd(-10) pendown() pensize(20) pencolor("blue") seth(10) colors=["blue","green","yellow","red"] for i in range(4): color(colors[i]) circle(40,80) circle(-40,80) pencolor("violet") circle(40,40) fd(40) circle(16,180) fd(40*2/3)
无角正方形
import
turtle turtle.setup(600,400,200,200) turtle.pensize(2) turtle.pencolor("blue") turtle.pendown() turtle.fd(80) turtle.penup() turtle.seth(90) turtle.fd(10) turtle.pendown() turtle.fd(80) turtle.left(90) turtle.penup() turtle.fd(16) turtle.pendown() turtle.fd(60) turtle.penup() turtle.left(90) turtle.fd(10) turtle.pendown() turtle.fd(70)

 

六角形
from
turtle import * setup(600,600,200,200) pensize(2) penup() fd(-50) pendown() pencolor("blue") seth(30) fd(120) seth(-90) fd(120) seth(150) fd(120) seth(30) fd(40) seth(90) fd(40) seth(-30) fd(120) seth(-150) fd(120) seth(90) fd(80)

 

 

 

第一次作业

标签:circle   yellow   post   tle   gpo   let   pos   log   from   

原文地址:https://www.cnblogs.com/zkf1/p/8665700.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!