I'm learning pygame and when i reached the set icon part,i was unable to do it it kept giving me an error that no such file found in directory i dont know how to put the full path of the image either help Here is the code:
import pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
#Title and screen
pygame.display.set_caption("Practice")
icon = pygame.image.load('monitor.png')
pygame.display.set_icon(icon)
#Game Loop
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
And here is the error:
icon = pygame.image.load('monitor.png')
FileNotFoundError: No such file or directory.