import turtle
import random
import turtle as t
import random as r
t.Turtle().screen.delay(0)
t = turtle.Pen()
t.hideturtle()
turtle.bgcolor(“#000000”)
for i in range(600):
t.pencolor(“#ffffff”)
x = random.randint((-800), 800)
y = random.randint((-800), 800)
d = random.randint(1, 5)
t.penup()
t.goto(x, y)
t.pendown()
t.dot(d)
turtle.bgcolor(‘black’)
笔颜色
turtle.pencolor(‘black’)
字号
turtle.pensize(1)
速度
turtle.speed(1000000)
画布大小
turtle.setup(0.99, 0.9, 0.8, 0.8)
地球
turtle.pensize(3)
turtle.penup()
turtle.goto((-10), (-1350))
turtle.pendown()
turtle.fillcolor(“#000099”)
turtle.begin_fill()
turtle.pencolor(“#000099”)
turtle.circle(600)
turtle.end_fill()
地球版图
turtle.penup()
turtle.goto((-10), (-290))
turtle.pendown()
turtle.fillcolor(‘SeaGreen’)
turtle.begin_fill()
turtle.pencolor(‘Green’)
turtle.right(10)
turtle.forward(70)
turtle.circle(30, 40)
turtle.right((-20))
turtle.forward(50)
turtle.right(60)
turtle.forward(40)
turtle.end_fill()
turtle.setheading(0)
turtle.penup()
turt