import pygame as pg
pg.init()
pg.display.set_caption("Pravougaonik")
(sirina, visina) = (300, 250)
prozor = pg.display.set_mode((sirina, visina))

# bojimo pozadinu u belo
prozor.fill(pg.Color("white"))
# crtamo zeleni pravougaonik
pg.draw.rect(prozor, pg.Color("green"), (10, 10, 100, 60), 5)
# crtamo plavi pravougaonik
pg.draw.rect(prozor, pg.Color("blue"), (120, 80, 150, 100))


pg.display.update()#osvežava prikaz prozora
while pg.event.wait().type != pg.QUIT:
    pass
pg.quit()






