Skip to content

← Computing, Reimagined

Computing, Going Further, Grades 6–8

Questions past the course for students in Grades 6 to 8: puzzles, games, simulations and stories, each to play with on the page and then program, in blocks or in Python. Not in any exam.

(about 4 MB) Saving for offline reading… 0 of 0 topics Saved for offline reading · · Couldn’t save. Check your connection.
Bookmark this page or add it to your home screen to open it without internet. How?
  • Android, Chrome: ⋮ menu → Add to Home screen
  • iPhone, Safari: Share → Add to Home Screen

Games and how computers play them

  1. Topic 1Rules that play a game Can Eight Rules Play Tic-Tac-Toe Without Ever Losing? A list of eight plain rules, followed in order, plays a game you can’t beat. Which rule matters most? The blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops, lists and functions).  
  2. Topic 2Winning strategies How Do You Always Win at Nim? A game of stones you can always win, if you know a secret that is hidden in binary. Binary, from Grade 6; the blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and functions).  
  3. Topic 3Predicting people Can You Beat a Computer at Rock-Paper-Scissors? You think you choose at random. A program that only counts what you did before thinks otherwise. The blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops, lists and functions).  
  4. Topic 4Simulation Why Do Snakes and Ladders Games Take So Long? Nobody can work out the average game in their head. Ten thousand games played by a program can. If and variables in blocks, from Grade 7; the Python parts from Grade 8 (while loops, lists and functions).  

Classic puzzles and algorithms

  1. Topic 5Maze-solving rules Can a Robot Get Out of Any Maze? One rule, without any map, gets a robot out of almost any maze. Which mazes beat it? Loops in blocks, from Grade 6 (Programming with Blocks); if/else blocks, from Grade 7; the Python parts from Grade 8 (loops, lists and functions).  
  2. Topic 6Binary How Does the Mind-Reading Card Trick Work? Five cards of numbers find anyone’s secret number. The magic is something you already know. Binary, from Grade 6; the blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops, lists and functions).  
  3. Topic 7Doubling How Many Moves to Move 64 Disks? A puzzle with a legend: when the last of 64 disks is moved, the world ends. Should we worry? Loops in blocks, from Grade 6; variables in blocks, from Grade 7; the Python parts from Grade 8 (loops, lists and functions).  
  4. Topic 8Counting information How Do You Find the Fake Coin in Three Weighings? Twelve coins, one fake, a balance and three weighings. Why can twelve be done and fourteen not? The blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops, lists and functions).  
  5. Topic 9States and paths Can You Cross the River with the Tiger, the Goat and the Grass? An old river-crossing puzzle turns into a map with dots and lines, and the map solves it. The blocks from Grade 7 (True or False: Logic); the Python parts from Grade 8 (loops, lists and functions).  
  6. Topic 10Graph coloring Can Four Colors Paint Any Map of Nepal? Color all 77 districts so no neighbors match. Four colors are always enough, but finding them is another matter. Nothing for coloring by hand; the Python parts from Grade 8 (loops, lists and functions), with dictionaries explained on the page.  
  7. Topic 11Trying every route How Many Ways Round Bhaktapur’s Temples? Five temples have 12 round trips to try. Thirty would keep the world’s fastest computer busy for tens of thousands of years. Python, from Grade 8 (loops and lists); the ★ challenge in blocks, from Grade 7.  
  8. Topic 12Simple rules, surprising patterns What Does an Ant Do with Two Simple Rules? An ant on a grid follows two rules. For a long time it makes a mess, and then something strange happens. The blocks from Grade 7 (if/else); the Python parts from Grade 8 (loops, lists and functions).  

Simulating real science

  1. Topic 13Physics step by step Can You Land on the Moon? A few lines of arithmetic, repeated each second, are enough to fly a lander down to the Moon. The blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and functions).  
  2. Topic 14Random walks How Far Does a Wandering Ant Get? An ant takes 100 random steps. How far from home does it end up? Less far than you think. The blocks from Grade 7 (variables and the random block); the Python parts from Grade 8 (loops, lists and functions).  
  3. Topic 15Random sampling How Can Throwing Rice Find π? Grains of rice thrown at random on a square drawing can work out one of the most famous numbers in mathematics. The blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and functions).  
  4. Topic 16Modeling a spread How Does a Cold Spread Through a School? One sick student, a whole school. A small change in how many each one infects changes everything. The blocks from Grade 7 (variables and repeat); the Python parts from Grade 8 (loops, lists and functions).  
  5. Topic 17Feedback control How Does a Heater, or a Drone, Hold Steady? Switching fully on and off makes a heater overshoot. A gentler rule is how a drone hovers still. Nothing for the tank; the programs in Python, from Grade 8 (loops, lists, functions and the micro:bit board).  

How things work

  1. Topic 18Check digits How Does a Barcode Catch a Typing Mistake? A shopkeeper types a barcode with one digit wrong, and the computer knows at once. How, without knowing the right number? Blocks, from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and functions).  
  2. Topic 19Finding and fixing errors Which Card Was Flipped? Turn over one card while a friend looks away, and they find which one. The same trick fixes damaged messages. Blocks, from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and lists).  
  3. Topic 20State machines How Does a Traffic Light Know What Comes Next? A traffic light is a short list of states and the arrows between them. So is much more than a traffic light. The blocks from Grade 7 (if/else); the Python parts from Grade 8 (functions and the micro:bit board).  
  4. Topic 21Random numbers How Does a Computer Roll a Die? A computer can only follow rules. So where do its random numbers come from, and can they repeat? The blocks from Grades 6 and 7 (variables and repeat); the Python parts from Grade 8 (loops, lists and functions).  
  5. Topic 22Hiding data in bits How Do You Hide a Picture Inside Another? Change the last bit of every color in a photo and no eye can tell. A whole second picture fits in there. Colors as numbers and binary, from Grade 7; the blocks from Grade 7 (Variables and Choices); the Python parts from Grade 8 (loops and lists).  

The limits of computing

  1. Topic 23Fixed-size numbers What Is the Biggest Number a Computer Can Count To? A counter with a fixed number of bits goes round like a meter. What happens when it reaches the end? Binary (Grade 6) and overflow (Grade 7); the blocks from Grade 7, the Python parts from Grade 8 (loops and functions).  
  2. Topic 24Exponential growth Can a Computer Check Every Possible Chess Game? Doubling grains of rice on a chessboard runs out of rice. Counting chess games runs out of universe. Coming soon. You need loops in Python (Grade 8).

Famous bugs and stories

  1. Topic 25Overflow in real life Why Did a Video’s View Counter Break? A famous video broke a view counter, a game broke at level 256, and computer clocks have a date of their own. Coming soon. You need binary (Grade 6); loops in Python (Grade 8).
  2. Topic 26Units and bugs Why Did a Spacecraft Crash on Mars? Every line of the program was right, and the spacecraft was still lost. The two parts disagreed about one word. Coming soon. You need loops in Python and functions (Grade 8).
  3. Topic 27Patterns in rhythm Did Poets in Ancient India Count in Binary? Long before computers, poets listing every rhythm of short and long beats found binary counting, and a famous sequence. Coming soon. You need binary (Grade 6); loops in Python (Grade 8).
  4. Topic 28Punched cards How Did Nepal Count Its People with Its First Computer? Before screens, machines sorted punched cards by their holes. Nepal’s census was one of the jobs they did. Coming soon. You need lists (Grade 8).

Making art and music

  1. Topic 29Angles and loops Why Does a Turtle’s Star Close Up? Turn the same angle again and again: sometimes the turtle comes home with a star, sometimes it never does. Coming soon. You need block programs (Grade 6).
  2. Topic 30Random patterns Can One Random Choice Draw a Maze? Draw “/” or “\” at random in each square, and a maze appears out of nothing. Coming soon. You need block programs (Grade 6); variables and choices in blocks (Grade 7).
  3. Topic 31Patterns as programs How Does a Loom Follow a Program? Dhaka cloth repeats by rules. A loom that read its pattern from punched cards helped lead to the computer. Coming soon. You need block programs (Grade 6).
  4. Topic 32Notes as numbers How Does a Computer Play a Tune? A note is a number of vibrations a second. A list of numbers is a song, and multiplying changes its key. Coming soon. You need how computers store sound and pictures (Grade 7); lists (Grade 8).

Real data from Nepal

  1. Topic 33Estimating from samples How Do You Count Tigers You Can’t See? Nobody can line up every tiger in Chitwan. Marking some and looking again tells you how many there are. Coming soon. You need loops in Python (Grade 8).
  2. Topic 34Patterns in real data When Can You See the Himalaya from Kathmandu? Some days the mountains stand out clear, most days they hide. A year of air data shows when to look. Coming soon. You need lists (Grade 8).

Where technology is going

  1. Topic 35Navigation How Does a Robot Know Where It Is? A robot counting its wheel turns gets more lost with every step. A few landmarks put it right. Coming soon. You need loops in Python (Grade 8).
  2. Topic 36Learning from rewards Can a Machine Learn a Game by Itself? Matchboxes full of beads, with nobody telling them the rules, learn to play a game. Coming soon. You need how computers learn (Grade 6); how machines learn (Grade 7).

Practice

How to use this book

These topics go past the school course, for anyone who wants to know more. Each one starts from things you learned in class, linked under its title, so you can look back. Each is a question, with the subject it belongs to beside its number. They are not in any exam. Inside you’ll find:

  • Worked examples: try them first; the answer stays hidden until you open it.
  • Try it questions and each topic’s questions at the end, with hints and answers to open when you’re ready.
  • Diagrams to play with: drag, slide and change things to see what happens.
  • Did you know? boxes with the stories and surprises behind the computers.

Every fact here has been checked against reliable sources, but these topics have not yet been reviewed by subject experts. If you find a mistake, please tell us.