Build something
Projects
Lessons teach one idea at a time. Projects make you glue them together, which is where it actually sticks. No step-by-step code to copy, just a brief, a few milestones and an empty-ish editor.
Free projects
Number guesser
The computer picks a number, you guess, it says higher or lower. Loops, if/else and input() in one tiny game.
- Pick a secret number with
random.randint(1, 100). - Read guesses from
input()in a while loop. - Print "higher" or "lower" until the guess is right, then print how many tries it took.
Grade report
Turn a pile of test scores into a tidy report: everyone's mark, the class average and who came top. Dictionaries and loops doing real work.
- Loop over the
marksdictionary with.items()and print each name and score. - Work out the class average and print it with one decimal place.
- Find the student with the highest mark without using
max(), then try it withmax()and compare.
Bill splitter
Two inputs, one button, one answer. Read values from a form, do some maths, show the result on the page.
- Make inputs for the bill total and the number of people.
- On click, read both values with
Number(input.value). - Show each person's share with two decimals using
toFixed(2).
One-question quiz
A question, three buttons, and a page that tells you if you got it right. Clicks, classList and a bit of CSS so it feels like a real app.
- Give each answer button a
data-correctattribute set to "yes" or "no". - On click, add a
rightorwrongclass to the button and show a message in the#resultparagraph. - Disable all the buttons after the first click so nobody can cheat.
Playlist stats
Answer real questions about a playlist: top artists, total minutes, the longest song. GROUP BY gets a workout.
- Count songs per artist and sort by the count.
- Find the total playlist length in minutes.
- Find the longest song with
ORDER BYandLIMIT.
Tuck shop sales
A week of tuck shop sales in two tables. Find the best seller, the busiest day and the snack nobody bought. JOIN, GROUP BY and a LEFT JOIN that earns its keep.
- Show how many of each product were sold, best seller first, using
JOINandGROUP BY. - Find the day with the most money taken. You need
SUM(qty * price). - List any product that was never sold, using
LEFT JOINandIS NULL.
Bit printer
Print any number in binary using shifts and masks. Once you can see the bits, overflow stops being magic.
- Write
void print_bits(unsigned char x). - Loop from bit 7 down to 0 and print
(x >> i) & 1. - Print 5, 255 and what 255 + 1 becomes in an unsigned char.
Reverse a string in place
No library help: find the end of a string yourself, then swap characters from both ends until they meet. The best pointer practice there is.
- Write
int my_strlen(const char *s)that counts characters up to the zero byte. - Write
void reverse(char *s)with one pointer at the start and one at the end, swapping as they move inwards. - Test it on "hello", on a one-letter string and on an empty string.
Pro projects coming soon
Bigger builds with checkpoints, automatic tests for each milestone and a code review checklist. The lessons stay free forever; Pro is how we will keep the lights on.
Text adventure engine
Rooms as dictionaries, an inventory as a list, and a game loop that parses commands. Build the engine, then write your own story.
Get told when it opensTo-do app that remembers
Add, tick off and delete tasks, saved in localStorage so they survive a refresh. The classic, done properly.
Get told when it opensDesign a school database
Design tables for students, classes and grades from scratch, then answer the questions a timetable office actually asks.
Get told when it opensWrite your own malloc
Carve a big byte array into blocks, track what is free, and hand out memory yourself. The best way to understand the heap is to be the heap.
Get told when it opensWant to hear when Pro opens?
There is no sign-up list on this site yet, and this page does not collect anything. If you want a heads-up, send a one-line email to the address here and we will reply when Pro launches. That is it, no newsletter.