085. the magic 8-ball: variables and selection in python (ks3)
Build a digital Magic 8-Ball game in Python. Learn how to use random numbers and IF statements to make your program make decisions.
How does a video game know whether you have won or lost? It uses selection - allowing the code to make decisions based on different conditions. In this lesson, we are going to build a digital Magic 8-Ball! You will learn how to generate random numbers and use IF statements to tell your Python program exactly how to respond to the user's questions.
Last modified: March 26th, 2026
