标签:fas 练习 code turtle 循环 技术分享 test circle ide
import turtle for i in range (5): turtle.forward(100) turtle.right(144)
import turtle for i in range (5): turtle.up() turtle.goto(0,-20*i+1) turtle.down() turtle.circle(20*i)
import turtle turtle.fillcolor(‘red‘) turtle.begin_fill() while True: turtle.forward(200) turtle.right(100) if(abs(turtle.pos()))<1: break turtle.end_fill() turtle.hideturtle()
import turtle turtle.speed(‘fastest‘) turtle.setup(700,500,0,0) turtle.fillcolor(‘yellow‘) turtle.color(‘yellow‘) turtle.bgcolor(‘red‘) def my_goto(x,y): turtle.up() turtle.goto(x,y) turtle.down() def my_draw1(r): turtle.begin_fill() for i in range(5): turtle.forward(r) turtle.right(144) turtle.end_fill() my_goto(-300,75) my_draw1(100) my_goto(-225,170) turtle.left(50) my_draw1(50) my_goto(-150,93) turtle.left(44) my_draw1(50) my_goto(-120,0) turtle.left(50) my_draw1(50) my_goto(-180,-50) turtle.left(50) my_draw1(50)
5. 画◇花瓣的太阳花
import turtle turtle.color(‘orange‘) turtle.bgcolor(‘purple‘) for i in range(1,73): turtle.speed(‘fastest‘) turtle.left(10) turtle.forward(100) turtle.right(45) turtle.forward(100) turtle.right(135) turtle.forward(100) turtle.right(45) turtle.forward(100)
标签:fas 练习 code turtle 循环 技术分享 test circle ide
原文地址:http://www.cnblogs.com/1031353319qq/p/7517530.html