Fabian_Olczak
Fabian_Olczak

Reputation: 89

Pygame program doesn't starting, python icon just bouncing on dock

When I trying to run my pygame program, nothing is happening, only python icon bouncing on dock and after few second stop. When I right click on it, it is written: "python does not respond".

There is my film with this problem: https://i.sstatic.net/sH94D.jpg

That's the code I'm trying to run:

import pygame
pygame.init()

win = pygame.display.set_mode((500, 500))

pygame.display.set_caption("First_Game")

x = 50
y = 50
width = 40
height = 60
vel = 5

run = True
while run:
    pygame.time.delay(100)

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False

pygame.quit()

Upvotes: 1

Views: 467

Answers (1)

Fabian_Olczak
Fabian_Olczak

Reputation: 89

Okay, I changed python version to 3.6 and it's works.

Upvotes: 1

Related Questions