Scratch Sorting Hat
Learn how to create a 'Harry Potter' style sorting hat with this free Scratch tutorial.
Introduction:
The Sorting Hat is an artefact used at Hogwarts in the Harry Potter books. The hat decides which of the four school houses (Gryffindor, Slytherin, Hufflepuff and Ravenclaw) each new student is assigned to. At the start of each school year, the Hat is placed on every first-year student's head. The Hat announces its choice aloud, and the student joins the selected house.
In this tutorial, you will learn how to create a Harry Potter style sorting hat using Scratch.
The Sorting Hat is an artefact used at Hogwarts in the Harry Potter books. The hat decides which of the four school houses (Gryffindor, Slytherin, Hufflepuff and Ravenclaw) each new student is assigned to. At the start of each school year, the Hat is placed on every first-year student's head. The Hat announces its choice aloud, and the student joins the selected house.
In this tutorial, you will learn how to create a Harry Potter style sorting hat using Scratch.
The 'Sorting Hat' scene from Harry Potter and the philosopher's Stone:
Your first game
STEP 1
Look at the sample code (below) and try to work out what the code is doing. Click play button (right) to see if you where right
STEP 1
Look at the sample code (below) and try to work out what the code is doing. Click play button (right) to see if you where right
Click here to see inside the code.
Source code: https://scratch.mit.edu/projects/603671205
Challenge 1
Using the sample 'Dice roll' solution above, create a program to simulate the roll of a dice.
Hint: Use this partially working example to help you with this task.
Example:
Using the sample 'Dice roll' solution above, create a program to simulate the roll of a dice.
Hint: Use this partially working example to help you with this task.
Example:
Source code: https://scratch.mit.edu/projects/608189165
Sorting Hat Challenge
Using what you have learnt, create a 'Harry Potter' style sorting hat that will randomly pick a house from:
Slytherin
Gryffindor
Hufflepuff
Ravenclaw
Hint: You can use this partially working example to help you with this task:
https://scratch.mit.edu/projects/604276175
Your finished program should look like this:
Using what you have learnt, create a 'Harry Potter' style sorting hat that will randomly pick a house from:
Slytherin
Gryffindor
Hufflepuff
Ravenclaw
Hint: You can use this partially working example to help you with this task:
https://scratch.mit.edu/projects/604276175
Your finished program should look like this:
Extra Challenge
Create a random name pick which will pick a person from your class.
Create a random name pick which will pick a person from your class.
Licence:
Unless otherwise specified, everything in this repository is covered by the following licence:
Unless otherwise specified, everything in this repository is covered by the following licence:
Scratch "Sorting Hat" lesson is licenced under a Creative Commons Attribution 4.0 International License.
Keywords:
Scratch tutorial, Scratch programming language, Scratch programming, Scratch coding.
Scratch tutorial, Scratch programming language, Scratch programming, Scratch coding.