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

简单4个正方形

时间:2017-04-13 23:27:12      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:简单   turtle   blog   color   应用   yellow   style   pre   goto   

 

接触一段py th

import turtle

turtle.penup() #the first circle

turtle.goto(0,-200) 

turtle.pendown() 

turtle.circle(200)

turtle.pencolor("red")

turtle.pensize(30)

turtle.penup() #the second circle

turtle.goto(0,-150) 

turtle.pendown() 

turtle.circle(150)

turtle.pencolor("yellow")

turtle.pensize(35)
 
turtle.penup()#the third circle 

turtle.goto(0,-100) 

turtle.pendown() 

turtle.circle(100)

turtle.pencolor("green")

turtle.pensize(40)

turtle.penup() #the fuorth circle

turtle.goto(0,-50) 

turtle.pendown() 

turtle.circle(50)

turtle.pencolor("purple")

turtle.pensize(45)
mport turtle

turtle.penup() #the first circle

turtle.goto(0,-200) 

turtle.pendown() 

turtle.circle(200)

turtle.pencolor("red")

turtle.pensize(30)

turtle.penup() #the second circle

turtle.goto(0,-150) 

turtle.pendown() 

turtle.circle(150)

turtle.pencolor("yellow")

turtle.pensize(35)
 
turtle.penup()#the third circle 

turtle.goto(0,-100) 

turtle.pendown() 

turtle.circle(100)

turtle.pencolor("green")

turtle.pensize(40)

turtle.penup() #the fuorth circle

turtle.goto(0,-50) 

turtle.pendown() 

turtle.circle(50)

turtle.pencolor("purple")

turtle.pensize(45)

 

on,虽然不能熟练应用,但还是希望有所尝试。

简单4个正方形

标签:简单   turtle   blog   color   应用   yellow   style   pre   goto   

原文地址:http://www.cnblogs.com/zj123-/p/6706752.html

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