CORRECT CODE WILL BE LIKE BELOW:
from pygame.locals import *
import sys,pygame
screen=pygame.display.set_mode((200, 100))
pygame.display.set_caption("hello")
while(True):
for event in pygame.event.get()This is the correct code:
from pygame.locals import *
import sys,pygame
screen=pygame.display.set_mode((200, 100))
pygame.display.set_caption("hello")
while(True):
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()