[go: up one dir, main page]

0% found this document useful (0 votes)
12 views1 page

Import Pygame

This document contains a Python script using the Pygame library to create a graphical window. It draws various shapes including circles, polygons, lines, rectangles, and an ellipse with different colors. The program runs until the user closes the window.

Uploaded by

natasasvabic82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Import Pygame

This document contains a Python script using the Pygame library to create a graphical window. It draws various shapes including circles, polygons, lines, rectangles, and an ellipse with different colors. The program runs until the user closes the window.

Uploaded by

natasasvabic82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

import pygame

pygame.init()

prozor = pygame.display.set_mode((900,700))

prozor.fill(pygame.Color(0,255,255))

pygame.draw.circle(prozor,pygame.Color("Yellow"),(900,0),200,0)

pygame.draw.circle(prozor,pygame.Color("White"),(600,200),70,0)

pygame.draw.circle(prozor,pygame.Color("White"),(680,200),45,0)

pygame.draw.circle(prozor,pygame.Color("White"),(520,200),45,0)

pygame.draw.polygon(prozor,pygame.Color("Green"),((0,700),(200,200),(500,400),(700,250),
(900,700)),0)

pygame.draw.line(prozor,pygame.Color("Black"),(200,200),(200,100),4)

pygame.draw.rect(prozor,pygame.Color("Red"),(150,450,300,300),0)

pygame.draw.polygon(prozor,pygame.Color("Brown"),((150,450),(300,350),(450,450)),0)

pygame.draw.rect(prozor,pygame.Color("Black"),(150,500,100,200),0)

pygame.draw.rect(prozor,pygame.Color("Black"),(320,480,80,80),0)

pygame.draw.ellipse(prozor,pygame.Color("Blue"),(500,550,320,100),0)

pygame.display.update()

while pygame.event.wait().type != pygame.QUIT:

pass

pygame.quit()

You might also like