AITeky Learn

AiTeky Original Interactive Learning & Practice Beginner

Reading code for campus tests: trace it, predict it, spot the bug

Trace loops, conditions, functions, recursion and arrays on paper the way campus tests ask, check every prediction by running the same code, then spot the bug in code an AI assistant wrote.

Many campus hiring tests now include code reading: a short piece of pseudocode or C, Java or Python, and the question "what does it print?" No computer, no running it: you trace it on paper. These questions check whether you understand what code does, which matters more now that AI assistants write so much of it. Someone still has to read that code and say whether it is right.

Each lesson shows the way tests write code (plain pseudocode), teaches a way to trace it that does not lose track, and then lets you check your prediction by running the same code in Python in your browser. Predict first, then run: the gap between the two is where you learn.

  • Learn lessons teach one kind of code each: loops, conditions and operators, functions and recursion, arrays and strings.
  • The Industry ready lesson is test day, plus spotting the bug in code an AI assistant wrote.

You should know what a variable, a loop and an if statement are. No other programming is assumed.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 30 min Free sample πŸ”’ AiTeky Pass Tracing loops: what does it print? Trace for and while loops with a table of variables, check whether the loop's end value is included, count how many times a loop runs without running it, and follow nested loops.
  2. 02 30 min πŸ”’ AiTeky Pass Conditions and operators: integer division, remainders, order and short circuits Work out integer division and remainders, apply the order of operations to mixed expressions, follow an if / else if chain where the first true branch wins, and see why "and" and "or" can skip their second part.
  3. 03 35 min πŸ”’ AiTeky Pass Functions and recursion: tracing calls and returns Follow a value into a function and back out, tell return from print, see why changing a parameter does not change the caller's number, and trace recursion with a stack of calls, including the order of prints and how many calls a function makes.
  4. 04 30 min πŸ”’ AiTeky Pass Arrays and strings: indexes, swaps and off-by-one Read arrays and strings from index 0 to length βˆ’ 1, trace loops that change an array while reading it, see why swapping across the whole array undoes itself, count characters, and take slices.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 05 30 min πŸ”’ AiTeky Pass Test day and on the job: the code section, and spotting the bug in AI-written code Pace a code-reading section with a trace table for every question, then use the same skill at work, reviewing code an AI assistant wrote by testing the edge cases it most often misses (empty input, negatives, the first and last element, 0 and 1), and fix one such bug.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in