CodinGame is a free programming games platform, enabling developers – beginner and experts alike – to hone their coding skills and have fun by solving programming puzzles online. Each exercise is sorted by level of difficulty and is available in 20 different programming languages.
Because it is easier to learn to code by playing, the CodinGame platform can also be a source of inspiration for teachers willing to diversify their computer science courses.
One of the greatest challenges a professor faces when intending to teach programming is to capture the attention of his or her students. Nowadays, gamification as a means of learning to code while having fun is definitely one the best ways of doing so.
This lesson will explain the concepts of input/output, conditions, variables and loops, in an entertaining way, for about 1 hour.
In this game, you’re asked to write code for a space-cannon in order to neutralize oncoming waves of aliens. The cannon must be able to compare the distances of two advancing enemies and shoot the closest one first – and to do so until no enemies are left.
You may thus bring your students, step by step, from logical reasoning to implementation and finish with a recap of acquired notions.
Once the code is written in the online editor, you can test it on different test cases as well as correct it with help from the debug mode and console output. A viewer enables you to watch in real-time how your code behaves.
To go even further, you also have the possibility of using the other available puzzles of the CodinGame platform or of creating your own online course, as demonstrated by these two educational exercises: the first aims to teach the mechanics of a bubble sort in 6 minutes, the other deals with a breadth first search algorithm.