TechnologyComputing
Programming Basics: fun facts and quiz
The essentials in 7 ideas, with fun facts, an illustrated story and a quiz to see how much you know.
The essentials
What Code Is
Code is a set of instructions written in a programming language, like Python or JavaScript, that tells a computer exactly what to do.
Key fact
Computers do exactly what code says, even when it’s wrong.
Variables
A variable is a named box that holds a value, like score = 10. The program can read it and change it as it runs.
Key fact
Good variable names make code easier to read.
Loops
Loops repeat instructions. Instead of writing “print” 100 times, a loop can do it in two lines.
Key fact
An infinite loop never stops, which can freeze a program.
If Statements
An if statement lets a program make choices: if the password is right, open the account; otherwise, show an error.
Key fact
“else” covers what happens when the condition is false.
Bugs & Debugging
A bug is a mistake in code. Debugging means finding and fixing it, often by testing small pieces and checking what the program actually does.
Key fact
Explaining your code to a rubber duck is a real debugging trick.
The First Programmer
In 1843, Ada Lovelace published what’s often called the first computer program, for Charles Babbage’s Analytical Engine, which was never built.
Key fact
The Ada programming language is named after her.
Many Languages
There are hundreds of programming languages. JavaScript runs in web browsers, Python is popular for data and AI, and Swift and Kotlin build phone apps.
Key fact
JavaScript was created in just 10 days, in 1995.
Fun facts
Early programs were written by punching holes in paper cards, usually one line of code per card.
In many languages, x = x + 1 is perfectly fine: there, = means “store”, not “is equal to”.
Apple’s old headquarters stood at 1 Infinite Loop, named after the programming idea.
A classic bug is writing = instead of == in an if statement: it stores a value instead of comparing two.
Programmers call a bug that vanishes as soon as you try to study it a “Heisenbug”.
Ada Lovelace was the daughter of the poet Lord Byron.
Despite the name, JavaScript has almost nothing to do with the language Java.
Story: The Key Nobody Would Press

The Key Nobody Would Press
1968. Margaret Hamilton leads the team writing Apollo’s flight software. Her young daughter, playing at the simulator, crashes it by pressing the wrong key.
Hamilton wants to guard against that mistake. NASA says no: trained astronauts would never make it.
On Apollo 8, astronaut Jim Lovell made exactly that mistake, wiping the navigation data. Her team found a fix, and she got her safeguard.
True or false?
Tap your answer to see if you got it, and why.
-
Question 1 of 10
Python is a programming language.
Show the answer
True. One of the most popular in the world.
-
Question 2 of 10
A variable stores a value under a name.
Show the answer
True. Like a labelled box.
-
Question 3 of 10
A loop repeats instructions.
Show the answer
True. As many times as needed.
-
Question 4 of 10
An if statement lets a program make decisions.
Show the answer
True. It chooses what to do next.
-
Question 5 of 10
Debugging means finding and fixing mistakes in code.
Show the answer
True. Every programmer does it daily.
-
Question 6 of 10
Ada Lovelace wrote an early computer program in the 1840s.
Show the answer
True. For a machine that existed only on paper.
-
Question 7 of 10
JavaScript runs in web browsers.
Show the answer
True. It makes web pages interactive.
-
Question 8 of 10
Computers can guess what code was meant to say.
Show the answer
False. They follow it literally.
-
Question 9 of 10
A variable’s value can never change.
Show the answer
False. It can change as the program runs; that’s why it’s called a variable.
-
Question 10 of 10
Loops can only run once.
Show the answer
False. They can run many times, or forever.
Keep going in the app
KnowSoda learns what you know and brings back what you’re about to forget. Programming Basics has 6 more ideas at the Advanced and Expert levels.
Sources
- Python Software Foundation — The Python tutorial and history
- MDN Web Docs — JavaScript first steps
- Computer History Museum — Ada Lovelace
- Hunt & Thomas (1999), The Pragmatic Programmer (rubber duck debugging)
- NASA — Mars Climate Orbiter mishap investigation (1999)
- Git — About Git and its history



