Algorithms: step by step
An algorithm is a step-by-step plan so precise that someone, or a computer, can follow it without guessing.
Topics
16 topics
Step-by-step plans, loops and conditions, variables, debugging, sorting and searching.
An algorithm is a step-by-step plan so precise that someone, or a computer, can follow it without guessing.
With a loop you make a computer repeat something, with a condition you let it choose. That is how long programs become short and clever.
A variable is a box with a name in which a program keeps a value, like your score in a game. That value can change.
Almost every program has a mistake at first. Debugging means calmly looking for where it goes wrong and fixing that one line.
Computers sort and search all the time. Bubble sort puts a list in order step by step, binary search finds something lightning fast in a sorted list.
Binary numbers, bits and bytes, pixels and colours, text as numbers.
A computer counts with only 0 and 1, like a lamp that is off or on. With enough of those bits you can write any number.
Eight bits make a byte. Kilobyte, megabyte, gigabyte and terabyte are each a thousand times more. That way you know what fits on a USB stick.
A photo on a screen is a grid of pixels. Every pixel mixes red, green and blue light, each with a number from 0 to 255.
To a computer every letter is a number. Agreements such as ASCII and Unicode say which number belongs to which character.
How the internet works, what happens when you open a website, feeds and recommendations.
The internet is a worldwide net of computers. A message travels in small packets from router to router and is put back together at the end.
Your browser asks, a server answers. In between, DNS looks up the address, and https makes sure nobody along the way can read along.
An app uses ranking rules to choose what you see: every post gets a score from likes, how new it is and what you watched before. If you know the rules, you choose for yourself.
Strong passwords, spotting phishing, privacy and cookies, screen time in balance.
A password is strong if it is long and hard to guess. With a second step, 2FA, your account stays safe, even if your password leaks out.
Phishing is a fake message that wants to fish for your password or your details. With a few fixed signs you can spot it, and then you calmly do nothing.
Online you leave traces: what you share, where you are, what you look at. With a few choices, such as for cookies and permissions, you decide for yourself what others know.
Screens are fun and useful. A good day also has enough sleep, exercise and time with others in it. You can help choose that balance.