How the driving theory exam works in Morocco
40 audiovisual questions, 32 correct answers needed for category B, four languages to choose from: how the test runs, how it is scored and what happens next.
Updated October 30, 2026
The theory exam, which everyone simply calls "the code", is the gateway to a driving licence in Morocco. Knowing exactly how it works takes away a good part of the stress on the day.
The format
The exam is audiovisual and taken on screen. For each question, an image of a situation appears (a junction, a road sign, a traffic scene…) and the question is also presented with sound. You then pick your answer from several options.
Questions are drawn automatically from an official bank, depending on the licence category you are applying for. Two candidates sitting side by side will not get the same set. NARSA introduced a new question bank in March 2024, so if you study with older material, make sure it is up to date.
How many questions, and what score?
For category B:
- 40 questions in total;
- you need at least 32 correct answers out of 40 to pass;
- in other words, you can make no more than 8 mistakes.
Marking is automatic: the system calculates your score as soon as the test ends.
Available languages
You can take the exam in Arabic, Darija, Amazigh or French. A candidate who speaks none of these can be assisted by a sworn translator at their own expense. Pick the language in which you understand nuances best, because some questions hinge on a single word.
The pace
The exam moves at a steady pace, with no room for long hesitation, which is why practising in real conditions, against the clock, makes a real difference.
What happens next
- You pass: you can move on to the practical exam.
- You fail: you are called back for a second exam, normally within about 15 days. Use that time to work on your weak spots.
- Second failure: the file is cancelled and you need to put together a new one.
An unjustified absence on exam day counts as a failure, so let the centre know if you cannot attend.
What is really being tested
The exam does not just check that you know the signs. It tests whether you can read a situation: who has priority, what speed is right, which danger to anticipate. The classic topics come up again and again: signs, priority, speed, overtaking, parking, driver behaviour, safety and first aid.
The right habit
Aim high: if you regularly score 36 or more in practice, you go into the exam with a real safety margin. Practise with Permy's free tests.
📖 Source: Décret n° 2-10-311 du 29 septembre 2010 pris pour l'application des… · Obtention de mon permis de conduire (1ère fois)
Category B theory exam
Practise for free