Skip to main content

Inputs, Outputs & Processing

beginner12 min readLesson 47 of 169

Write the transformation in words first; the code is typing itself.

Programming is problem-solving with extra steps. The steps are the job:

  1. Inputs — what do I actually have? (types, shapes, edge cases)
  2. Outputs — what exactly must come out? (format, units, order)
  3. Processing — the transformation between them, in words FIRST.

Inputs -> Processing -> Outputs, on paper

"Find the best student": inputs = list of (name, score); output = one name; processing = scan, track the max, remember who holds it. Written out, the code is almost typing itself:

best_name, best_score = None, -1
for name, score in students:
    if score > best_score:
        best_name, best_score = name, score
print(best_name)

Beginners who skip the paper step debug for an hour; professionals who do it write the loop once.