Answer the question
In order to leave comments, you need to log in
Module 'pygame.display' has no attribute 'set_mod'. How to fix?
I studied the pygame library one by one, and named the file itself pygame. Nothing worked for me, and I googled the problem, where they wrote that it was impossible to call it that. I renamed, nothing changed. Deleted the file and created a new one, nothing. I even copied everything to another disk, it did not help. Rummaged through all the disks, there is no file with the name pygame.
Code itself:
import pygame
pygame.init()
win = pygame.display.set_mod(500, 500)
pygame.display.set_caption('Cuber World')
x = 50
y = 50
width = 40
height = 60
speed = 5
run = True
while run:
pygame.time.delay(100)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.draw.rect(win, (0, 0, 255), (x, y, width, height))
pygame.display.update()
And error:
module 'pygame.display' has no attribute 'set_mod '
Good people, please help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question