请求请求权

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")

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值