import pygame pygame.init() win = pygame.display.set_mode((500, 500)) pygame.display.set_caption("Cubes game") #Player x = 50 y = 425 width = 40 height = 60 speed = 5 isJump = False JumpCount = 10 run = True #Delay while run: pygame.time.delay(50) #Quit for event in pygame.event.get(): if event.type == pygame.QUIT: run = False #Keys keys = pygame.key.get_pressed() if keys[pygame.K_LEFT] and x > 5: x -= speed if keys[pygame.K_RIGHT] and x < 500 - width -5: x += speed if not(isJump): if keys[pygame.K_UP] and y > 5: y -= speed if keys[pygame.K_DOWN] and y < 500 - height -15: y += speed if keys[pygame.K_SPACE]: isJump = True else: if jumpCount >= -10: y -= (jumpCount ** 2) / 2 jumpCount -= 1 else: isJump = False jumpCount = 10 #Background win.fill((0,0,0)) #Player pygame.draw.rect(win, (0,0,255), (x, y, width, height)) pygame.display.update() pygame.quit() When I run the code, the application does not respond, everything worked before I added a jump, please help
