首页 > 代码库 > 简单4个正方形

简单4个正方形

 

接触一段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个正方形