Answer the question
In order to leave comments, you need to log in
The program writes a syntax error on line 4 and does not start. Where is the mistake?
import pygame
pygame.init()
screen=pygame.display.set_mode([640,480],0,0)
screen.fill([255,255,255])
avto=pygame.image.load("car.jpg")#(character loading )
screen.blit(avto,[50, 50])#(display drawing starting at position[50,50])
running=True
while running:
for event in pygame.event.get():
if event.type==pygame.QUIT:
running=False
pygame.quit()
Answer the question
In order to leave comments, you need to log in
There, not only on the 4th line, there are also on 7,8,9 and probably further. Did you type the code on an old typewriter or copy it from a pdf or djvu curve? My sublime broke from this code). There toli characters in different encodings, roofing felts some other game. Whatever it is, dial the code manually!
Here is the working code:
import pygame
pygame.init()
screen = pygame.display.set_mode([640,480],0,0)
screen.fill([255,255,255])
avto = pygame.image.load('car.jpg')
screen.blit(avto,[50,50])
pygame.display.update()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
pygame.quit()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question