Coding tests for apprenticeships check how you think about code, not how much you've built. Most employers expect beginners, so the questions stay close to the basics.
Loading…
What the test is like
Coding assessments vary more than any other test. Some are multiple choice, asking what a piece of code prints or where its bug is. Others give you a small problem to solve by writing code in the browser, on platforms such as HackerRank or Codility, where automatic tests check your answer. Some employers set a logical reasoning test instead, to see how you think rather than what you've learned.
This practice test is multiple choice, in the language the listing names, or Python if it names none. It covers the reading and reasoning that every format relies on: following code line by line, spotting bugs, and knowing how loops, conditions, lists and dictionaries behave.
An example question
total = 0
for n in range(1, 6):
if n % 2 == 0:
total += n
else:
total -= 1
print(total)What does this Python code print?
Show the answer
Answer: A. range(1, 6) runs from 1 to 5. The even numbers, 2 and 4, add 6 to the total, and the three odd numbers each take away 1. 6 − 3 = 3.
Where you'll meet it
Software development, data and cyber security apprenticeships, at technology firms, banks, consultancies and the public sector. Many entry-level schemes don't expect any coding experience, so check the listing: if it asks for none, the assessment is more likely to be a reasoning test.
How to do well
- Trace by hand. Write down each variable and update it line by line, as the computer would.
- Watch the edges: where a loop starts and stops, and whether a range includes its last number.
- Read what the code is meant to do before you look for the bug.
- Learn one language's basics well, such as Python's lists, dictionaries, strings, loops and functions.
- If you have to write code, get a simple version working first, then improve it.
How this practice test works
- Written for you when you start, around one of your applications, a job description, a sector or none, then checked by a second, independent pass. Any question where the two disagree is dropped.
- Topics: Tracing output, Finding bugs, Control flow and logic, Data structures.
- 10 or 20 questions, timed by default at about 90 seconds a question. You can switch the timer off.
- Graded with explanations: every answer explained and your score by topic, then short feedback on how you did.
- Needs a free account, because each test is written for you. Saved results go to your history on the aptitude tests page, with your progress and weakest topics.
ApprentiFinder isn't affiliated with or endorsed by HackerRank, Codility or any other assessment provider. These are our own practice questions.