Technology · Unit 9
Coding Basics
What code is, and the ideas behind it
Programming is mostly about breaking a task into steps precise enough that something with no judgement can follow them, and the precision is the hard part.
The unit covers what code is, sequences, conditionals, loops, and algorithms and debugging.
This unit breaks down into 23 short steps and 120 questions, starting at difficulty 1 and building to 5. Below you can see exactly what it covers, how the path is structured, and worked examples with explanations.
- Steps
- 23
- Questions
- 120
- Difficulty
- 1-5
What this unit covers
- Sequences
- Conditionals
- Loops
- Algorithms and Debugging
- What Code Is
Where this fits
Follows Software. Programming continues it.
Where people slip
Computers do exactly what you wrote, not what you meant. Almost every bug is the gap between those two, which is why debugging is a skill rather than a nuisance.
How the unit is structured
Coding Basics runs as 23 short steps that unlock in order. 17 are practice rounds and 6 are challenge rounds that pull together everything before them. Questions start at difficulty 1 and climb to 5 as you progress.
Challenge rounds
Example questions
30 real questions from this unit, with the answer and the reason behind it, grouped by what they practise. There are 120 in the unit altogether.
Algorithms and Debugging
- Multiple choiceLevel 1
1. What is a bug in coding?
- A mistake or error in the codecorrect
- A helpful new feature
- A kind of computer mouse
- A way to save a file
A bug is a mistake or error in the code that makes it work wrong.
- True or falseLevel 1
2. Debugging means finding and fixing errors in code.
Answer: True
True. Debugging is the work of finding bugs and fixing them.
- Fill the blankLevel 2
3. A step-by-step set of instructions to solve a problem is an ____.
- algorithmcorrect
- answer
- app
- icon
An algorithm is a clear plan of steps to solve a problem.
- Match the pairsLevel 2
4. Match each coding word to what it means.
Answer: Algorithm = A step-by-step plan; Bug = An error in code; Debugging = Fixing errors; Code = Instructions for a computer
Each of these basic coding words has a clear meaning that helps you understand programs.
- Type the answerLevel 2
5. Finding and fixing errors in code is called d____.
Answer: debugging
Debugging is the process of finding and fixing bugs.
- Sort into groupsLevel 3
6. Sort each one as a Bug or Not a bug.
Answer: The app crashes = Bug; A wrong total is shown = Bug; The screen freezes = Bug; The program works as planned = Not a bug; The correct answer appears = Not a bug
Crashes, wrong totals, and freezes are bugs, but a program working as planned is not a bug.
Conditionals
- Fill the blankLevel 1
7. An ____ statement runs code only when something is true.
- ifcorrect
- and
- end
- or
An if statement checks a condition and runs its code only when that condition is true.
- True or falseLevel 1
8. An if statement lets a program make a choice.
Answer: True
True. An if statement checks something and decides what to do next.
- Type the answerLevel 1
9. The word used to run code only when a condition is true is ____.
Answer: if
The word if starts a conditional that runs code when its condition is true.
- Choose all that applyLevel 2
10. Which of these are conditions, meaning something that is either true or false? (pick all that apply)
- It is rainingcorrect
- The score is over 10correct
- The door is opencorrect
- Jump three times
A condition can be true or false, like 'it is raining', but 'jump three times' is an action, not a condition.
- Multiple choiceLevel 2
11. What does a conditional (an if statement) do?
- Chooses what to do based on whether something is truecorrect
- Repeats steps many times
- Stores a picture
- Ends the whole app
A conditional makes a choice, doing something only when a condition is true.
- Choose all that applyLevel 3
12. Which of these could a program check as a condition? (pick all that apply)
- The score is above 100correct
- The user is logged incorrect
- The age is 18 or morecorrect
- Print the word hello
Conditions are true-or-false checks like 'score above 100', but 'print the word hello' is an action, not a check.
Loops
- Fill the blankLevel 1
13. A ____ repeats a set of steps so you do not have to write them many times.
- loopcorrect
- list
- gap
- name
A loop repeats steps, saving you from copying the same code over and over.
- Choose all that applyLevel 2
14. Which tasks could a loop help with? (pick all that apply)
- Ringing a bell 10 timescorrect
- Counting from 1 to 20correct
- Blinking a light 5 timescorrect
- Saying hello just once
Loops are great for anything you repeat, like ringing a bell many times, but not for a one-time hello.
- Multiple choiceLevel 2
15. Why are loops helpful?
- They save you from writing the same steps over and overcorrect
- They make the computer run slower
- They delete your code
- They change the screen color
Loops save you from writing the same steps over and over.
- Odd one outLevel 2
16. Which task is the odd one out because a loop would NOT help with it?
- Waving hello one timecorrect
- Clapping 5 times
- Knocking 3 times
- Counting to 100
Doing something only once does not need a loop, but the other tasks repeat.
- True or falseLevel 2
17. You must write a step 10 times just to make it happen 10 times.
Answer: False
False. A loop can repeat one step 10 times for you.
- Guess the numberLevel 4
18. A loop runs 4 times. Each time it adds 2 to a total that starts at 0. What is the final total?
Answer: 8
Adding 2 four times gives 2 plus 2 plus 2 plus 2, which is 8.
Sequences
- Fill the blankLevel 1
19. A sequence is a list of steps that happen in a certain ____.
- ordercorrect
- color
- size
- sound
A sequence runs its steps in a set order, one after another.
- Multiple choiceLevel 1
20. What is a sequence in coding?
- A set of steps in a certain ordercorrect
- A single button on a mouse
- A picture of a computer
- A broken piece of code
A sequence is a set of steps that a computer does in a certain order.
- True or falseLevel 1
21. In a sequence, the order of the steps matters.
Answer: True
True. Doing the steps in a different order can give a different result.
- Type the answerLevel 1
22. The order that steps happen in is called the s____.
Answer: sequence
A sequence is the order in which steps are carried out.
- Choose all that applyLevel 2
23. Which of these are true about a sequence? (pick all that apply)
- The steps run in a set ordercorrect
- Doing steps in a different order can change the resultcorrect
- Steps happen one after anothercorrect
- A sequence repeats steps forever
In a sequence the steps run in order, one after another, and changing the order can change the result.
- Put in orderLevel 2
24. Put these toast-making steps in the right order.
Answer: Get the bread -> Put it in the toaster -> Turn the toaster on -> Take out the toast
You get the bread first, put it in, turn it on, and take the toast out last.
What Code Is
- Fill the blankLevel 1
25. Code is a set of ____ that a computer follows.
- instructionscorrect
- pictures
- feelings
- colors
Code is made of instructions, and the computer follows them step by step.
- Multiple choiceLevel 1
26. What is code?
- A set of instructions that a computer followscorrect
- A kind of computer screen
- A part of the keyboard
- A picture on the desktop
Code is a set of instructions that tells a computer exactly what to do.
- True or falseLevel 1
27. A computer can decide on its own what to do, without any code.
Answer: False
False. A computer only does what its code tells it to do.
- Choose all that applyLevel 2
28. Which of these run because of code inside them? (pick all that apply)
- A phone appcorrect
- A video gamecorrect
- A websitecorrect
- A wooden spoon
Apps, games, and websites all run on code, but a wooden spoon has no code at all.
- Odd one outLevel 2
29. Which of these is the odd one out because it is NOT a programming language?
- Englishcorrect
- Python
- Scratch
- JavaScript
Python, Scratch, and JavaScript are programming languages, but English is a spoken language.
- Type the answerLevel 2
30. A person who writes computer programs is called a p____.
Answer: programmer
A programmer is a person who writes code to make programs.
Where these questions come from. Each unit starts as a plan of the concepts it should cover and the difficulty it should span. Questions are written against that plan with AI assistance, then checked by a validator that rejects anything without a single defensible answer, an explanation, or plausible wrong options. How we write questions sets out the whole process, and corrections are fixed in the bank and reach the site and the app the same day.
How you practise
This unit mixes 10 different question formats, so you are recalling and applying rather than recognising the same layout every time.
- Choose all that apply
- Fill the blank
- Guess the number
- Match the pairs
- Multiple choice
- Odd one out
- Put in order
- Sort into groups
- True or false
- Type the answer
Practise Coding Basics
120 questions across 23 steps. Start with step one and crawl at your own pace.
Play this unitMore units in Technology
- What is Technology?What technology is, and the tools and machines around us
- Everyday TechnologyThe gadgets we use at home and on the go
- Meet the ComputerWhat a computer is and its main parts
- The InternetWebsites, email, searching and going online
- Staying Safe OnlinePasswords, privacy and being kind and careful online
- Computer HardwareThe physical parts that make a computer work
- SoftwareOperating systems, apps, files and updates
- Networks and the InternetHow devices connect and talk to each other