import turtle as t
import random

t.speed(0)
t.Screen().bgcolor('skyblue')

def rysuj_drzewo(x, y):
    # pień
    t.penup()
    t.goto(x, y)
    t.pendown()
    t.color('brown')
    t.begin_fill()

    for _ in range(2):
        t.fd(20)
        t.left(90)
        t.fd(40)
        t.left(90)

    t.end_fill()
    t.penup()
    t.goto(x - 20, y + 40)
    t.pendown()
    t.color('green')
    t.begin_fill()
    for _ in range(3):
        t.fd(60)
        t.left(120)
    t.end_fill()

def rysuj_chmure(x, y):
    t.penup()
    t.goto(x, y)
    t.pendown()
    t.color('white')
    t.begin_fill()
    for _ in range(6):
        t.circle(20)
        t.fd(15)
    t.end_fill()

def rysuj_kwiat(x, y):
    t.penup()
    t.goto(x, y)
    t.pendown()
    t.color('yellow')
    t.begin_fill()
    t.pensize(width=6)
    for _ in range(8):
        t.circle(10, 180)
        t.left(135)

miejsca = [
    [-200, -100],
    [-100, -150],
    [0, -100],
    [150, -120],
    [-150, 150],
    [50, 180],
    [200, -50]
]

for poz in miejsca:
    losowa_liczba = random.randint(1, 3)

    x, y = poz[0], poz[1]
    if losowa_liczba == 1:
        rysuj_drzewo(x, y)
    elif losowa_liczba == 2:
        rysuj_chmure(x, y)
    else:
        rysuj_kwiat(x, y)

t.hideturtle()
t.done()