蟒蛇
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)