<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>23 Feb 2023 10:34:28 Z</lastBuildDate><pubDate>20 Feb 2023 16:17:53 Z</pubDate><description>Python 3.3.2 and pygame-1.9.2a0.win32-py3.3.msi were just downloaded. I've decided to attempt a couple YouTube lessons and see whether they work.&#13;
&#13;
&#13;
I tried 'Game Development Tutorial - 2 - Basic Pygame Program' by thenewboston to see whether it worked. It is designed to generate a dark background and a mouse-shaped ball (or so I think). When I try to execute it, I get a syntax error; if I delete it, all I get is a dark pygame window. The code is as follows:&#13;
&#13;
[code:wl]&#13;
bgg="bg.jpg"&#13;
ball="ball.png"&#13;
&#13;
import pygame, sys&#13;
from pygame.locals import *&#13;
&#13;
pygame.init()&#13;
screen=pygame.display.set_mode((540,341),0,32)&#13;
&#13;
background=pygame.image.load(bgg).convert()&#13;
mouse_c=pygame.image.load(ball).convert_alpha()&#13;
&#13;
while True:&#13;
    for event in pygame.event.get():&#13;
        if event.type ==QUIT:&#13;
            pygame.quit()&#13;
            sys.exit()&#13;
&#13;
    screen.blit(background), (0,0))&#13;
&#13;
[/code]&#13;
&#13;
The display. The blit(bakcgorund, (0,0)) command is the issue; when it encounters a syntax mistake, it emphasises the second bracket on the command's far right. This https://www.scaler.com/topics/python/ has taught me When I delete it, all that remains is a black pygame window. Can somebody assist me?</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error/read.awp</link><title>syntax error</title><managingEditor>moderateur@pcsoft.fr (Le modérateur)</managingEditor><webMaster>webmaster@pcsoft.fr (Le Webmaster)</webMaster><item><author>Britneymcdaniel</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69733/read.awp</comments><pubDate>23 Feb 2023 10:34:28 Z</pubDate><description>There are a few syntax errors in your code that need to be fixed. Here's the corrected code:&#13;
&#13;
scss&#13;
Copy code&#13;
import pygame&#13;
…</description><guid isPermaLink="true">https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69733/read.awp</guid><link>https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69733/read.awp</link><source url="https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error/read.awp">syntax error</source><title>Re: syntax error</title></item><item><author>Mike James</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69731/read.awp</comments><pubDate>20 Feb 2023 23:32:56 Z</pubDate><description>Try removing the bracket after the word background in that line</description><guid isPermaLink="true">https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69731/read.awp</guid><link>https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error-69731/read.awp</link><source url="https://forum.pcsoft.fr/fr-FR/pcsoft.us.windev/69728-syntax-error/read.awp">syntax error</source><title>Re: syntax error</title></item></channel></rss>
