Computer Science I / Simple Modelling with Code
Practice question · Put in order

Order the steps of modelling a problem before writing real code.

Hints
  1. You must know what the data is before you can design steps that operate on it.
  2. Pseudocode records the algorithm; the constraints frame what it must cope with.
Show the answer
  1. Identify the data: what quantities and entities, and what type is each
  2. Define the algorithm as steps that transform input into output
  3. Write those steps in plain pseudocode
  4. State the assumptions and constraints the program must handle
Why

Name the data, design the algorithm, record it as pseudocode, and pin down the assumptions. Getting the logic right in pseudocode before real code lets you avoid fighting syntax while thinking, diving straight into code is the pitfall this lesson names.

Read the lesson: Simple Modelling with Code →

Practise Simple Modelling with Code

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Simple Modelling with Code