Checking your sign-in…
Tech4Good

Learn to make the computer do what you say.

Lessons to get you ready for the Bootcamp.

Start here

New to all of this? Here is a short introduction to what you are about to learn.

Welcome to Intro to Computer Science — PythonKhan Academy · Open on YouTube

01

What is a computer, really?

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.

Why this matters for you. People sometimes think coding is about being a genius with maths. It isn't. It's about breaking a big problem into small, clear steps — the same thing a good market trader, a nurse, or a football coach already does every day.

What Makes a Computer, a Computer?Khan Academy Partners / Code.org · Open on YouTube

The three parts of almost every program

Everything is numbers

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.

Binary & Data — how computers store everything as numbersKhan Academy Partners / Code.org · Open on YouTube

02

Your first lines of code

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.

Notice: each print goes on its own line, and they run top to bottom — in order, just like the recipe idea from Lesson 1.

Print statements and expressionsKhan Academy · Open on YouTube

Your turn

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.

Break it on purpose

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.

03

Talk with the computer

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.

User inputKhan Academy · Open on YouTube

One trap to know: 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():
Your turn

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?

04

Boxes that hold things

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.

Variables and assignmentKhan Academy · Open on YouTube

The rule for boxes: the name goes on the left, an = sign in the middle, and the value on the right. The = means "put this in the box," not "equals" like in maths.

Numbers vs. words

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.

Your turn

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.

05

Making decisions

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.

if statementsKhan Academy · Open on YouTube

The two most important details: the line ends with a colon :, 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.

The comparison words

When there are more than two possible answers, Python adds a middle step called elif. This video walks through all three together:

if / elif / elseKhan Academy · Open on YouTube

Your turn

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.

06

Doing it again and again

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.

List iteration — looping over every itemKhan Academy · Open on YouTube

Why coders love this: whether the list has 3 names or 3,000, the loop is the same length. This is exactly how an app sends a message to a whole community at once.

Looping with numbers

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.

for loops with range()Khan Academy · Open on YouTube

Your turn

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.

07

Teach it a new trick

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.

FunctionsKhan Academy · Open on YouTube

Functions that hand an answer back

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:

Why this matters so much: every big app — MoMo, WhatsApp, all of them — is thousands of small functions calling each other, each one simple and reusable. Once you can write a function, no program will ever look too big to build. It's just functions all the way up.
Your turn

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.

08

Build a tiny project

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:

Let's code a simple Python calculatorBro Code · Open on YouTube

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.

Final challenge

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.

You're ready. If you followed to here, you already understand more than most people ever will about how technology works. Come to the bootcamp with this file open — we build from exactly this point Akwaaba.
Level up · hands-on challenges

Now play with it.

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.

Build a real web page

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.

index.html · your code
my-first-page.html
Try these: change your name and town. Change 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.
Your turn

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.

Fix the recipe

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.

      🔍

      Spot the bug

      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.

      💭

      Guess the output

      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.

      The bigger picture

      Code is a skill. Where can it take you?

      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.

      Real jobs · tap a card to flip it
      📱 BUILDER

      App Developer

      tap to see a real day →

      App Developer

      A day looks likeMeet the team in the morning, then write code that adds a feature — like a new payment screen. Test it, fix what breaks, ship it to real users.
      Works at (Ghana)Fintechs like ExpressPay, Hubtel, or any startup with an app.
      School pathComputer Science or Computer Engineering — plus lots of self-practice, like this page.
      ← tap to flip back
      📊 THINKER

      Data Analyst

      tap to see a real day →

      Data Analyst

      A day looks likeTake a messy pile of numbers — say, clinic visits across a region — and find the story in it. Make charts that help a boss decide what to do next.
      Works at (Ghana)Ghana Health Service, banks, telecoms like MTN, research groups.
      School pathStatistics, Computer Science, or Maths. Python and spreadsheets are your daily tools.
      ← tap to flip back
      🎨 MAKER

      Product Designer

      tap to see a real day →

      Product Designer

      A day looks likeDraw how an app should look and feel so it's easy for a market trader or a farmer to use. Test it with real people and improve it.
      Works at (Ghana)Any tech company. Designers are in short supply and well paid.
      School pathYou don't strictly need a CS degree — a strong eye, practice, and a portfolio matter most.
      ← tap to flip back
      🛡️ PROTECTOR

      Cybersecurity Analyst

      tap to see a real day →

      Cybersecurity Analyst

      A day looks likeDefend banks and companies from the exact fraud and hacking that hurts people. You use the same skills — but to protect, and it pays well and legally.
      Works at (Ghana)Banks, the Cyber Security Authority, telecoms, global firms — remotely too.
      School pathComputer Science or IT, plus security certificates. Huge and growing demand.
      ← tap to flip back
      ?

      Which tech path fits you?

      Five quick questions. There are no wrong answers — just directions.

      Built here. By people from here.

      Two Ghanaians who started with very little and built companies that now reach millions. Neither had it easy.

      GR

      Gregory Rockson

      Founder of mPharma · started in Accra, 2013

      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.

      He turned a problem he saw at home into a company that now helps millions across the continent.
      AA

      Alloysius Attah

      Co-founder of Farmerline · started in a dorm room, 2013

      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.

      First computer bought with a student loan. Now his tech reaches millions of farmers worldwide.
      The point isn't the money. It's that both of them started exactly where you are — in Ghana, with a problem they cared about and a willingness to learn. That is the whole formula. You already have the first two. This page is the third.

      Two paths, same skills

      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.

      The builder's path

      Using your skills to build

      • Your name and reputation grow — people trust and hire you
      • Real companies, internships, and salaries that keep rising
      • Work you can be proud to show your family and community
      • Skills that open doors anywhere in the world, legally
      • You solve problems that help people around you
      The fraud path

      Using your skills to cheat

      • Arrest, a criminal record, and prison are real risks
      • Money comes and goes — nothing you build lasts
      • You must hide your work; no reputation, no future references
      • Every door to a real career quietly closes behind you
      • You harm ordinary people — often people like your own family

      Same skills. You get to choose where they take you. Tech4Good exists to help you choose the first one.

      Make it yours · tap to flip

      Tech, in our own words

      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.

      Variable
      A box that holds a value
      Adaka
      Like a labelled box at home — you put something in, and fetch it by name later.
      Loop
      Doing something again and again
      Twa mu bio
      "Go round again" — like pounding fufu, the same motion repeated until it's done.
      Bug
      A mistake in the code
      Mfomsoɔ
      An error to find and fix — every coder makes them, even the best ones.
      Function
      A reusable set of steps
      Adwuma nhyehyɛeɛ
      A recipe you can use over and over — write the steps once, run them anytime.
      Input
      Information going in
      Deɛ wode ma
      What you give the program to work with — a price, a name, a photo.
      Output
      The answer coming out
      Deɛ ɛba
      What the program gives back to you — the total, the message, the result.
      Starting the code engine…
      🎉