import turtle as t
import random
t.colormode(255)
t.bgcolor(10,160,240)
t.pensize(200)
t.penup()
t.goto(-400,400)
t.forward(800)
t.pendown()
t.color(20,180,220)
t.penup ()
t.goto(-400,400)
t.pendown()
t.forward(800)
t.color(20,180,220)
t.penup ()
t.goto(-400,200)
t.pendown()
t.forward(800)
t.color(20,180,220)
t.penup ()
t.goto(-400,0)
t.pendown()
t.forward(800)
t.color(20,180,220)
t.penup ()
t.goto(-400,-200)
t.pendown()
t.forward(800)
t.color(20,180,220)
t.penup ()
t.goto(-400,-400)
t.pendown()
t.forward(800)
#星星
t.pensize(3)
for i in range(6):
red=random.randint(180,255)
green=random.randint(180,255)
blue=0
t.color(red,green,blue)
x=random.randint(-400,400)
y=random.randint(100,400)
t.penup()
t.goto(x,y)
t.pendown()
l=random.randint(5,15)
t.begin_fill()
for i in range(5):
t.forward(l)
t.left(30)
t.forward(l)
t.right(120)
t.end_fill()
t.left(30)
#花
t.speed(0)
t.pensize(3)
for i in range(6):
red=random.randint(180,255)
green=0
blue=random.randint(180,255)
t.color(red,green,blue)
x=random.randint(-400,400)
y=random.randint(-300,0)
t.penup()
t.goto(x,y)
t.pendown()
l=random.randint(5,25)
t.begin_fill()
for i in range(9):
t.circle(10)
t.forward(l)
t.right(35)
t.forward(l)
t.right(125)
t.end_fill()
t.left(30)
t.pensize(20)
t.speed(5)
t.penup()
t.goto(-300,0)
t.pendown()
t.color('white')
t.left(125)
t.fd(100)
t.left(125)
t.fd(100)
t.right(125)
t.fd(100)
t.left(125)
t.fd(100)
t.penup()
t.goto(0,0)
t.pendown()
t.right(165)
t.fd(100)
t.left(90)
t.fd(50)
input("Press Any Key")