Answers for "install pygame window"

2

how to create a window in pygame

import pygame
pygame.init() #initialize pygame
SCREEN_WIDTH = 600 # width (in px)
SCREEN_HEIGHT = 800 # height (in px)

WIN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) # creates a screen of 600px X 800px

while True:
	pygame.display.update() # updates the screen
Posted by: Guest on July-02-2020
5

how to install pygame in python

pip install pygame
Posted by: Guest on May-28-2020
2

how to install pygame

# on windows write in powershell:
pip install pygame

# on os write in terminal 
pip install pygame
Posted by: Guest on December-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language