Teacher: Sorting Hat Lesson
Sorting children into houses can be time-consuming, but with magic Hogwarts were able to sort their yearly intake into houses really easily. Let's replace the magic with some code to achieve the same result!
In this lesson, students will create a RaspberryPi-powered Harry Potter-style sorting hat, using the button on a Pibrella add-on board.
It is assumed that students have prior knowledge of the programming concepts of loops, conditionals and functions in Python. Alternatively, the lesson can also be completed using Scratch.
What students will learn
By completing this lesson students will learn:
◾ How to create a random group generator based on the Harry Potter sorting hat.
◾ How to use functions, variables, randomisation, conditionals, and loops.
KS2 Programme of Study
◾ Design, write and debug programs that accomplish specific goals; solve problems by breaking them into smaller parts.
◾ Select, use and combine a variety of software on a range of digital devices to design and create a range of programs.
◾ Use sequence, selection and repetition in programs; work with variables and various forms of input and output.
◾ Use logical reasoning to explain how some simple algorithms work; detect and correct errors in algorithms and programs.
KS3 Programme of Study
◾ Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems.
© LampPi 2024