See what resources your exam permits. Decide what to practice based on where you get stuck when attempting a small course-level problem. Given that the objective is to ultimately succeed in this assessment, I suggest not turning off every convenience in your course environment.
Find out what “coding exam” means in your course
Start with the instructions to your current exam. If something is unclear, ask about it. For example, “can we run our own tests” is more instructive than “can we use the IDE.”
- Depending on the assesment medium and the level of feedback you’re given, you may or may not be able to run and test code yourself.
- Depending on the exam you may or may not be able to use an editor to write code and get syntax highlighting and auto complete.
Paper or computer may be permitted, with limitations.
- What documentation pages are allowed? What other reference sheets are allowed? Is internet access permitted?
- What language and library versions are permitted? What are the grading criteria? Is code in a format other than C code permitted? Is executable code required, or is pseudocode accepted?
There are real differences here. Old advice for Stanford CS106B describes paper-based exams with tolerance for minor syntax errors. Illinois CS 124’s proficiency page describes browser-based programming with restricted documentation and without general IDE autocompletion. Neither link tells you what the rules are, but taken together they illustrate the point that “computer based” means something different from your usual development environment.[1][2]
Give the missing tools a small, revealing task
If loops and lists are common in your course, try writing the function longest_run(readings, limit) that returns the length of the longest consecutive series of readings greater than limit. Here readings is a list of numbers. Return 0 if readings is an empty list. For the input [4, 7, 8, 2, 9], and with a limit of 5, the longest run would be 2 and not 3 since the consecutive numbers have to be touching.
There are exceptions to every rule. If you get stuck writing the function header this could indicate you have a recall issue with syntax. If you forget what a function in a library does this is an API question. If you get stuck writing a function that determines what information to retain between a series of readings this is a state and decomposition question.
Tracing, or working through one line of code at a time, can help you figure out how variables change, even if you’re not able to predict those changes. You might not be able to design a complete algorithm, but novice programmers can usually complete very short segments of code. Difficulty with designing even short segments of code can show up in many different ways. If designing an algorithm isn’t working for you, look through examples of code that do the task and see if you can write a similar variation.[4]
Keep help where it still has a job
If syntax is the snag, I’d consult a correct example, close it, and write a small variation from memory. Keep the algorithm simple so you’re practicing the language form, not wrestling with two gaps at once. If the exam permits documentation, practice finding the needed signature there too. Memorizing an entire API would be a lot of work for the wrong problem.
A ‘planning gap’ indicates a different type of help is needed. Leave syntax references open to work out what each variable is remembering. If tracing is the method you’re using, try to anticipate the values before each step. When debugging, keep the broken version to show people to explain the issue; removing the broken version leaves others guessing as to what the issue may be. Next time you work through this method on your own, try not using the tool. Then try the restrictions together.
This is my suggestion for a ‘tapering’ method, not based on any research. A 2024 debugging review revealed that in some cases, the use of the tool increased efficiency but removing the tool resulted in no further improvement. This shows that documentation or autocomplete isn’t to blame and there shouldn’t be a need to do each practice session without using a tool.[5]
Check correctness without a Run button
One solution in Python is provided here. Use your course’s language to create examples of your own. This example uses basic iteration and conditional statements.
I suggest using your course’s language for examples like this, to create examples of your own using basic looping and conditional statements.[3]
“`python
def longest_run(readings, limit):
current = 0
best = 0
for reading in readings:
if reading > limit:
current += 1
if current > best:
best = current
else:
current = 0
return best
“`[3]
First, derive expected answers from the problem statement, not from your code. With limit 5: [] gives 0; [5] gives 0; [6] gives 1; [6, 7, 8] gives 3; and [6, 7, 1, 8] gives 2. These cover empty input, equality, a single success, an unbroken run, and a break after the best run.
| Reading processed | current | best |
|---|---|---|
| None yet | 0 | 0 |
| 4 | 0 | 0 |
| 7 | 1 | 1 |
| 8 | 2 | 2 |
| 2 | 0 | 2 |
| 9 | 1 | 2 |
The useful distinction is at reading 2: current resets, but best survives. After each reading, current describes the qualifying streak ending there; best describes the longest streak anywhere in the portion processed. That’s the loop’s invariant in everyday language. Check whether every branch preserves those meanings. A few passing examples alone don’t explain why the algorithm works.

Next consider other aspects of the language such as parameters and initialized variables. Be consistent with your names and use comparison operators correctly. Get the indentation correct and use return in the correct place. In Python return statement means end of function. Therefore return should be placed within the loop. Since a function exits on a return statement, if there is no input, the function returns None. Faulty control structures will not justify the use of a given construct.[3]
A failing test is the beginning of debugging
Finding and fixing bugs is not the same as designing and implementing tests. Replacing the comparison operator < with >= would yield the result of [6, 1, 7] and an expected result of 1 but the result is actually 2. Currently, the statement in the else branch is doing nothing. Replacing the statement with pass would make the else branch valid but still do nothing. Rewriting the if statement with comparison operator < to >= shows that the result expected is 0 but the actual result is 1. Change to >= would yield the result [5]. Since statements like these are self-documenting to a degree, sometimes it’s best to explain that concept to the student rather than just showing them how to produce the correct output.
![Input [5] exposes an incorrect inclusive threshold; input [6, 1, 7] exposes a missing streak reset.](https://dailystudyplan.com/wp-content/uploads/2026/11/editorial-study-coding-exam-autocomplete-documentation-33f1190ba47a-1024x683.webp)
With execution available, predict the result before running, then trace a mismatch to the first wrong state. Without it, write the expected outputs and trace on paper. You can check that reasoning by running the code afterward, outside the rehearsal.
I’d finish with a fresh course-level problem under the actual rules. This little loop can show you what to repair; it can’t tell you whether you’re ready for recursion, classes, or everything else your exam covers.
Sources and references
- Stanford University: CS106B Advice about exams
- University of Illinois Urbana-Champaign, CS 124: CS 124 Proficiency Exam
- Python Software Foundation: More Control Flow Tools
- ACM SIGCSE Bulletin; author-hosted copy at UC San Diego: A Multi-National Study of Reading and Tracing Skills in Novice Programmers (2004-12)
- ACM Transactions on Computing Education; author-hosted copy: Decoding Debugging Instruction: A Systematic Literature Review of Debugging Interventions (2024-11)
Autocorrect not mentioned as a tool
missing example for edge cases in longest_run
tracing before coding is underemphasized
What if syntax errors are penalized?
planning gap not clearly defined
seems like a small task could reveal big gaps
would prefer a real-world coding scenario
how does grading handle pseudocode?
edge case outputs feel arbitrary without explanation
expected output for [6,7,1,8] is unclear