We're leaving the turtle drawing module behind now and moving on to coding concepts we need to create games, such as handling user input; if statements to make your code do something based on a condition; and while loops to make your code keep running until a condition isn’t true.
A guessing game where the computer picks a number between 1 and 9, and the player has five chances to guess the number.
Printing text to the screen
String concatenation
Getting user input
If statements and comparison operators
While loops
A computer or tablet capable of accessing the online interactive Python environment called Trinket. You can create a trinket.io account using your google school account; or
If you don’t want to create an account you can use the embedded interactive trinkets below to run code and see what happens; or
You can use a computer that has the Python programme installed.
Sign in to your trinket.io account, click on your name and then select ‘New Trinket’ and ‘Python’ from the drop-down menus.
Use this link to go to the Code Club online project: projects.raspberrypi.org/en/projects/cd-beginner-python-sushi
Follow each step in the project, type code into your own trinket. You can look at the embedded trinket below for help if you get stuck.