第一题
第二题
import turtle turtle.width(10) turtle.color("blue") turtle.circle(40) turtle.penup() turtle.goto(70,0) turtle.color("black") turtle.pendown() turtle.circle(40) turtle.penup() turtle.goto(140,0) turtle.color("red") turtle.pendown() turtle.circle(40) turtle.penup() turtle.goto(110,-60) turtle.color("green") turtle.pendown() turtle.circle(40) turtle.penup() turtle.goto(30,-60) turtle.color("yellow") turtle.pendown() turtle.circle(40) turtle.penup()
第三题
import turtle turtle.width(3) turtle.color("orange") turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.penup() turtle.goto(40,0) turtle.pendown() turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.penup() turtle.goto(40,40) turtle.pendown() turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.penup() turtle.goto(0, 40) turtle.pendown() turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.forward(30) turtle.right(90) turtle.right(90) turtle.forward(30)