Coding exercises with answers?

I find that when I’m learning, I learn best by doing/practising. When I was trying to get to grips with HTML I did this by using a website that had a game where I had to fill a plate with food using HTML and my learning was guided by it telling me where I had gone right or wrong.

I was wondering if anyone had suggestions of websites that have games or exercises to help learners get to grips with different coding skills?


I’ve been using this site . It let’s you chose track and if you want you can get mentor feedback and you can watch other people solutions to the problems.


Flexbox Froggy is loads of fun:

And I haven’t done Grid Garden yet, but same idea:

If you like small “Code challenges” you can try Code Wars, you can also do this as a team:


I use, which is a “kata” site, i.e. you get set challenges in the language of your choice. There are around 30 languages with challenges of graded difficulty, so you level up.
The best bit is not just that you have a problem to solve and practise your skills, but also that you get to see how others answered it, so you learn tips and tricks you may not have known about.
You also can see “I did better than THAT person, I’m not as bad as I thought”.

I’ve done Ruby and Python on there.

If a problem is too hard or ambiguous, skip it or just give up, and see what the answer is. I’m not afraid to admit defeat when something is just too obscure to understand the question or the solution evades me after many attempts. Sometimes it’s a badly-worded question - nothing to do with me…

I also save my solutions and the best other solutions to my hard drive, to reference later. Okay I’m a hoarder :wink:

I also have tried Hackerrank for some challenges, but I don’t get to see how others answered the challenges.


To improve my coding I have done free courses here: I found useful courses on javascript including chai assertions

Some suggestions from Slack, I’ve not tried them myself

I like Advent of Code for algorithm type stuff. With 6 years of challenges, there’s a fair corpus of problems to work on.

The thing that makes it good for learning is that it’s a popular enough contest that you can find YouTube videos of solutions, search r/adventofcode for discussions of given challenges, as well as plenty of solution repos. The variety of languages people use also makes it interesting/useful, and I know lots of folks who use it as an excuse to try to build their fluency with a new language.

I’ll repeat that it’s mainly good for algorithms, not for teaching code craftsmanship. Think of it more like brain teasers than katas.