Lessons to get you ready for the Bootcamp.
New to all of this? Here is a short introduction to what you are about to learn.
A computer — whether it's the phone in your pocket or a laptop — is a machine that is very fast but very literal. It cannot guess what you mean. It only does exactly what it is told, in the exact order you tell it. That's it. That's the whole secret.
Think about making kenkey. If you gave a friend the steps out of order — "wrap it, then add water, then grind the corn" — you'd get a mess. A recipe only works when the steps are clear and in the right order. Code is a recipe for the computer. Programming is just the skill of writing very clear recipes.
Deep down, a computer stores everything — letters, photos, songs, even this page — as numbers, and it stores those numbers as millions of tiny on/off switches (the famous 1s and 0s). Don't believe it? Every letter has a secret number. Press Run:
ord() reveals a letter's number; chr() turns a number back into its letter. This one idea — that any information can be turned into numbers — is the deepest foundation of computer science. Everything else you'll ever learn builds on it.
You will make the computer talk. Right now, in this page.
In Python, the command to make the computer show something on screen is print. You put what you want to show inside brackets and quotes. Press Run code below and watch.
The words inside the quotes are called a string — just text. You can print anything you like. Try changing the words to your own name, then press Run again.
print goes on its own line, and they run top to bottom — in order, just like the recipe idea from Lesson 1.In the box above, change the three lines so they say your real name, your neighbourhood, and one thing you want to build one day. Run it. That message is the first thing you ever made a computer say.
Real coders see error messages every single day — they aren't failures, they're the computer asking for help. Try it now: delete one of the closing quotes above and press Run. You'll meet the Code Coach, who explains what went wrong and exactly how to fix it. Then fix it yourself. Congratulations — that fix is called debugging, and it's half of every developer's job.
So far it only talks to you. Now it will ask questions — and use your answers.
Remember the three parts from Lesson 1? You've made output with print. The missing piece is input — and in Python the command is called, sensibly, input(). When the program reaches it, it stops and waits for a human. Run this:
A little box pops up — that's the browser asking the question on Python's behalf. Whatever you type goes straight into the name box, and the program carries on with your answer inside it. The same code now behaves differently for every person who runs it — that's what makes software feel alive.
input() always hands you text, even if you type 14. And text can't do maths — remember, "4" + "3" is "43"! To treat an answer as a number, pass it through int():Build a tiny market assistant: ask "What are you buying?" and "How much does it cost?", then print a sentence like Buying rice for 12 cedis. Think carefully: which answer needs int() — and which doesn't?
Variables: giving a name to a piece of information so you can use it again.
Imagine a labelled box at the market. You write "kenkey" on it and put the price inside. Later, instead of remembering the number, you just say "check the kenkey box". In code, that box is called a variable.
Three things just happened. You made three boxes (kenkey, fish, pepper), put a number in each, and then the computer added them for you with +. Change any price and run again — the total updates by itself. That is the "process" part from Lesson 1.
= sign in the middle, and the value on the right. The = means "put this in the box," not "equals" like in maths.Notice prices have no quotes (they are numbers you can add), but text like "Total:" has quotes. That difference matters — the computer adds numbers, but it only shows words.
You are buying items for a family meal. Make boxes for rice, chicken and oil with real prices, then print the total. Bonus: add a transport box for your trotro fare home and include it in the total.
Teaching the computer to choose: if this, then that.
So far the computer just does everything. But real apps decide. When you try to send MoMo, it checks: do you have enough money? If yes, it sends. If no, it warns you. In Python that check is the word if.
Read it out loud like English: "if balance is greater-than-or-equal-to fare, print the good message; else print the warning." Change balance to 2 and run it — now the other message shows.
:, and the line below it is pushed in (indented) with spaces. That spacing is how Python knows which lines belong to the decision. Keep it — the code breaks without it.>= greater than or equal to · <= less than or equal to> greater than · < less than== is exactly equal to (two equals signs — this is a question, not a box)When there are more than two possible answers, Python adds a middle step called elif. This video walks through all three together:
A pregnant woman should visit the clinic if her temperature is 38 or higher (this is the idea behind KlinikAlert). Make a box temperature = 39 and write an if / else that prints "Go to the clinic" or "You are okay". Try different temperatures.
Loops: the trick that makes computers so powerful.
Suppose you must greet 30 classmates. You wouldn't write 30 lines. Computers are built to repeat. A loop says "do this for every item in the list." Watch it greet in all three of our languages:
The list is inside square brackets [ ]. The loop goes through it one item at a time, and each time, word becomes the next greeting. Three items, so the message prints three times — but you only wrote it once. Add a fourth greeting to the list and run again; the loop handles it automatically.
range(1, 6) gives the numbers 1, 2, 3, 4, 5 (it stops before 6). Loops plus lists are enough to build surprisingly real things. One more tool — teaching the computer your own commands — and you're ready to build a real project.
Make a list of five fish sold at the Weija shore — ["tilapia", "salmon", "herring", ...] — and use a loop to print "Fresh tilapia for sale!" for each one.
Functions: bundle steps under your own command name, then use it like any built-in.
print(), input(), int() — so far you've used commands Python already knows. A function is how you teach it a new one. It's like showing a younger sibling how to set the table once — after that, you just say "set the table" and the whole routine happens. In Python, the teaching word is def:
Two lines of steps, written once — then run three times with a single word. The name in the brackets is a box the function fills freshly each time you call it: first "Ama", then "Kofi", then "Efua". Notice the function's body is indented, exactly like if and for — spacing shows Python which lines belong to it.
print only shows things on screen. The word return hands a result back to the program, so the code that asked can keep working with it:
MoMo charges roughly a 1% fee to send money. Write def momo_fee(amount): that returns amount * 0.01, then print the fee for sending 50, 200 and 1000 cedis. One function, three answers.
Everything together: a baby version of SeaPrice, the fish-market price checker.
You now know the six building blocks: print, input, variables, if/else, loops, and functions. Real programs are just these combined. Here is a small price checker that looks through today's fish prices and tells the buyer which ones fit their budget. Run it, read it, then change the numbers.
Watching someone build a small program end to end — deciding what to write next, and why — is the fastest way to see how the pieces fit. Here is a complete beginner project from scratch:
Look what you understand now: a variable for the budget, a list of fish and prices, a loop to check each one, and an if/else to decide. That is a genuine program. Every big app is this same idea, just larger.
Change the budget to 20 and run it — more fish should now say "you can buy this." Then add two more fish to the list with their prices. You just edited a real program's data, the way a working developer does. Super bonus: ask for the budget with input() instead of typing it in the code — now it's a real app anyone can use.
Reading code is one thing — bending it to your will is another. These four challenges let you build a real web page, put jumbled code in order, hunt for bugs, and predict what code will do. This is exactly the kind of thinking you'll use at the bootcamp.
Every website you've ever seen is made of HTML. Type on the left — the page builds itself on the right, live.
HTML uses tags in angle brackets to mark what each part is: <h1> is a big heading, <p> is a paragraph. Most tags come in pairs — one to open, one to close (with a /). Change the words below and watch the page on the right change instantly.
color: teal to color: crimson. Add a new <li>your item</li> to the list. Every edit shows up the moment you type it — no Run button needed.Make this page truly yours: change the big heading to a real welcome, list three things you love, and pick your own heading colour. This is a page you built from nothing — the same skill behind every website in the world.
Remember Lesson 1 — a computer runs steps in order. These steps are jumbled. Drag them into the right order to make the program work.
Goal: greet Adwoa. The program must first make the boxes, then combine them, then print. You can't use a box before you fill it!
Goal: add up a market bill. Make the list of prices, start the total at zero, loop through adding each one, then print the total.
Real coders spend more time reading code than writing it. Each program below has exactly one small mistake. Tap the line you think is wrong.
Goal: this should greet Esi by name — but it won't run. Which line has the mistake?
Hint: look closely at how the text and the box are joined together.
Goal: check if there's enough money to pay the fare. One line breaks it. Which one?
Hint: think about how every if line must end.
Goal: print every fruit in the list. It crashes with a NameError. Which line?
Hint: the computer is literal about everything — even capital letters.
Goal: warn when the price is high. Python complains about an expected indented block. Which line is wrong?
Hint: it's not about what is typed — it's about the spaces before it.
Before you run code, a good coder can already picture what it will do. Read each program in your head, then pick what it prints.
You've written real programs. Now the question that matters most: what can this actually become — for you, right here in Ghana? These next parts aren't about typing. They're about the doors that open once you can build.
Five quick questions. There are no wrong answers — just directions.
Two Ghanaians who started with very little and built companies that now reach millions. Neither had it easy.
Rockson grew up watching his own family struggle to afford medicine and find it in stock. Instead of accepting it, he built mPharma — a health-tech company that helps hundreds of pharmacies across Africa keep medicine affordable and available. It has grown to serve millions of patients across nine countries and raised over $65 million to do it.
Attah spent his childhood helping on his aunt's farm in the Volta Region. He got his first computer on a student loan and learned to code from a friend's roommate. With that, he and a co-founder built Farmerline — technology that now reaches over 2 million farmers in local languages, in more than 50 countries. TIME magazine named their platform one of the best inventions in the world.
You'll hear people say fast money can be made online by tricking others. It's worth being clear-eyed about where each road actually leads — because the skills are the same, but the destinations are not.
Same skills. You get to choose where they take you. Tech4Good exists to help you choose the first one.
Every one of these apps solves a real problem in a real Ghanaian community — the fish market, the clinic, the farm. They were built by young people who started exactly where you are now. At the bootcamp, you build the next ones.
Helps buyers and fishmongers at the shore see fair, up-to-date prices so nobody gets cheated.
Reminds expectant mothers about clinic visits and warns them when a symptom needs urgent care.
Connects students who need help with classmates who can teach — learning together, for free.
Lets people report overflowing rubbish and blocked gutters so the assembly can act faster.
Understands spoken Twi and Ga, so technology can finally speak the languages we speak at home.
Snaps a photo of a cassava leaf and spots disease early, before a whole farm's harvest is lost.
Next year, this gallery has your project in it.
Coding is usually in English, but the ideas belong to everyone. Here's a playful way to think about them in Twi and Ga. Tap a card to flip it.