Python is a programming langugage. Basically, a way that we tell the computer what to do! Python can be used to create a variety of different programs including games.
Go to Replit, create a pygame repl, and name it my_name
Write the following code in main.py:
Click on the green Run button at the top of the page
The output should look something like:
If you get an error or something different:
screen.draw.text("Your Name", topleft=(10, 10))
pgzrun
correctly?Play around with the code! See what happens when you change the text "Your Name"
and the numbers (10,10)
. Also try the following:
(10,10)
to (100,100)
. What happened? What does that tell you about what the code does?color="blue"
after you set
topleft
. Remeber to add a comma before you add the color code!Copyright © KX Technology Group, LLC. All Rights Reserved.