Higher or Lower
Posted on 01/10/2024
Word count: 280
Prior to studying Computer Science at University, I did not have any substantial previous coding experience since I didn't have the option to take computing/IT for GCSEs or A-levels. However, my A-level Maths teacher was kind enough to run a weekly after-school coding session where he would teach the very basics of coding to those of us who were interested. I was only apart of this group for about 6 weeks before I finished my A-levels and subsequently left the school, so I wasn't able to learn a lot, but the programming bug had definitely bitten me which ultimately led me to pursue Computer Science as a degree.
One of our final assignments in this group was to create a Higher or Lower game. This program would begin by picking two random numbers from 0-10 and asking the user if the second number was either higher or lower than the previous. If you guessed correctly, you'd be awarded some points and the program would pick another pair of numbers. If you guessed incorrectly, the game would end and your final score would be presented.
This is a very simple game but a great first project for beginners. I still make these games now and again when trying to familiarise myself with a new language. It incorporates many fundamental elements of programming such as printing to the console, storing a user's input, comparing variable values, generating random numbers, and implementing if-else statements and while loops.
Here are the separate links to each game (this may expand in the future):