3 ms·
My favourite teaching program is a “higher or lower” game. You get the computer to randomly generate a number between 1 and 100 and the user has to guess. They
by laumars 6y ago
My favourite teaching program is a “higher or lower” game. You get the computer to randomly generate a number between 1 and 100 and the user has to guess. They then get told if they’re too high or too low.
That program teaches variable assignment, loops, conditionals, mathematical comparisons, input and output. It teaches the difference between numbers and strings too. But it’s also a short program, fun to play, and easy enough for people to hack so they can alter stuff on there to subtly change its behaviour (eg the messages printed to screen, the range of numbers randomly generated, etc).
I’ve had good success using that program for a range of different age groups and capabilities.
Edit: just to add, we would cover the basics about variables etc first before moving on to that game. But that would be the first “useful” program they’d write.
- raghav_nautiyal 6y agoI will put that in as well :) Thanks