This Year 10 GCSE Computer Science lesson uses Replit on accounts the school has agreed, with each student working in their own project. The teacher recaps how a list stores several values and how random.choice picks one of them. Each student writes a program that asks the user a yes-or-no question with input(), stores eight answers of their own in a list and prints one at random; students who finish add a while loop so the user can keep asking until they type quit. They test with at least three questions, check that different answers appear, and hand in the code with a comment explaining how the list and random.choice work together.
This page is one of a growing set of PICRAT examples by cell, subject and grade. Page maintained by Andy Perryer.