ArticleslgStudy

computer science

Parsons problem

Parsons problem is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Parsons problem rather than just read about it. In short: Parsons problems are a form of an objective assessment in which respondents are asked to choose from a selection of code fragments, some subset of which comprise the problem solution. The Parsons problem format is used in the learning and teaching of computer programming.

Key takeaways

  • Parsons problem belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Parsons problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Parsons problem from memory before moving on to harder problems.

Reference excerpt

Parsons problems are a form of an objective assessment in which respondents are asked to choose from a selection of code fragments, some subset of which comprise the problem solution. The Parsons problem format is used in the learning and teaching of computer programming. Dale Parsons and Patricia Haden of Otago Polytechnic developed Parsons's Programming Puzzles to aid the mastery of basic syntactic and logical constructs of computer programming languages, in particular Turbo Pascal, although any programming language may be used. Parsons' programming puzzles became known as Parsons puzzles and then Parsons problems. Parsons problems have become popular as they are easier to grade than written code while capturing the students' problem solving ability shown in a code creation process.

Structure Parsons problems consist of a partially completed solution and a selection of lines of code that some of which, when arranged appropriately, correctly complete the solution. There is great flexibility in how Parsons problems can be designed, including the types of code fragments from which to select, and how much structure of the solution is provided in the question. Easier Parsons problems provide the complete block structure of the solution included in the question, and the provided lines of code simply need to be reordered and inserted into that structure. In the Parsons problem exam question, the first example shown, there are 6 pairs of statements, one mark is deducted for each incorrectly chosen line from the pairs, two marks are deducted if more than 2 lines are out of place, and one mark is deducted if up to two things are out of place. One mark is deducted if opening and closing braces are incorrectly used, or are not included where necessary.

Variants

Two-dimensional The two-dimensional variants require the student to also correctly indent the code instead of merely re-ordering the provided lines of code.

Faded In the faded variants, the lines of code may additionally contain blanks that the student needs to fill in.

Advantages The advantages of Parsons problems include:

being a complement or alternative to traditional programming exercises like code-tracing and code-writing the design of Parsons problems is flexible there are many variants that are continuously refined to better address student needs However, the effectiveness of Parsons problems, both as a question type and as a learning tool in CS education, remains uncertain due to a lack of replicated research in the field. A 2023 study by Xinying Hou, Barbara J. Ericson and Xu Wang investigated the use of Parsons problems to support students during code-writing exercises. The study randomly assigned 89 undergraduate students to conditions with or without access to Parsons problems as scaffolding. Among students with low computing self-efficacy, those provided with scaffolding achieved significantly higher practice performance and problem-solving efficiency than those without it. However, the researchers found no statistically significant differences between the conditions in post-test performance for either the low- or high-self-efficacy groups. The authors noted that the study covered one programming topic at a single university in the United States, limiting the generalisability of its findings.

Automation Parsons problems can be automated.

References

External links Faded Parsons Problems js-parsons - a JavaScript library for Parsons Problems

Worked examples

Example 1 — a first encounter with Parsons problem

Start with the simplest possible case. Write down what Parsons problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Parsons problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Parsons problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Parsons problem

In research
Parsons problem appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Parsons problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Parsons problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer science education, so understanding it makes those chapters shorter.
In everyday life
Look for Parsons problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Parsons problem” →

How to study Parsons problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Parsons problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Parsons problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Parsons problem in simple terms?

Parsons problems are a form of an objective assessment in which respondents are asked to choose from a selection of code fragments, some subset of which comprise the problem solution. The Parsons problem format is used in the learning and teaching of computer programming.

Why does Parsons problem matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Parsons problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Parsons problem.

Tags

  • Computer science education

Keep exploring