Welcome to your first step into coding! You do not need a laptop full of software or a maths degree to start. You only need curiosity, a phone or computer with a browser, and the patience to try things more than once.
Programs are instructions
A program is a list of instructions that a computer follows. Programming (or coding) is the skill of writing those instructions in a language the computer understands.
You already use dozens of programs every day:
- M-Pesa checks your PIN, your balance and then moves money.
- WhatsApp sends your message and shows two blue ticks when it is read.
- A matatu booking app shows seats, takes payment and prints a ticket.
Every one of those actions was written, line by line, by a person who learned the same basics you are learning now.
Computers are fast but not clever
A computer can do millions of calculations a second, but it has no common sense. It does exactly what you tell it – nothing more, nothing less.
Imagine telling a friend, "Make me tea." Your friend knows to boil water, add tea leaves, milk and sugar. A computer would need every step spelled out:
- Fill the sufuria with water.
- Put it on the jiko.
- Wait until the water boils.
- Add one spoon of tea leaves.
- Add milk and let it boil again.
- Pour into a cup through a sieve.
If you forget step 2, the computer will wait forever for cold water to boil. That is what a bug is: an instruction that is missing, wrong or in the wrong order.
Programming languages
Computers really only understand ones and zeros. Writing in ones and zeros would be painful, so people invented programming languages – special kinds of English-like text that are translated into machine instructions.
| Language | What it is often used for |
|---|---|
| HTML and CSS | The structure and look of web pages |
| JavaScript | Making web pages interactive |
| Python | Data, automation, school projects, back-end systems |
| Java / Kotlin | Android apps |
| SQL | Asking questions of databases |
In this course you will try Python and HTML, two of the friendliest starting points.
Your first program
Here is a one-line Python program. Press Try it Yourself » and then the run button to see it work.
print("Habari! I am learning to code.")Habari! I am learning to code.
print() tells Python to show whatever is inside the brackets. The text inside the quote marks is called a string.
Exercise
Fill in the Python command that shows text on the screen.
("Karibu Kisumu!")It is a five-letter word that also means to put on paper.
Why coding is a useful skill
Coding is not only for people who want to become software engineers. A shop owner in Eldoret can use a small script to total daily sales. A secretary can automate a boring report. A designer can build a portfolio website. Many coders also earn by taking on small projects for local businesses or online clients, which you will look at in week 4.
Practice task
Pick one app you use every day (M-Pesa, WhatsApp, TikTok, a school portal). In a notebook, write down five instructions you think the program follows when you use one feature – for example, "send a message". Keep this list; you will turn it into an algorithm in the next lesson.
SKOPE