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.
Click on the IDLE3 icon on the shelf. It's the icon that looks like a penguin.
Open the Python Shell. Then, From the File menu, choose New File. This will open a new window where we will write our code
Write the following code in the window:
From the Run menu, click Run Module, or just press the F5 key
You will then be asked to save the file. Click OK.
Then, type your name in the box and then click Save
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.