Parsons problems are a type of learning activity that involves solving programming problems by rearranging and ordering blocks of code, rather than writing new code from scratch. These problems are designed to focus on the structure and logic of a program, rather than the syntax of a specific programming language.
There are several benefits to using Parsons problems in programming education:
- They can be used to introduce programming concepts in a low-stress, interactive way. Since students are not required to write code, they can focus on understanding the underlying concepts and logic of the program, rather than being distracted by syntax errors.
- They can be a helpful tool for students who struggle with syntax errors or have difficulty writing code from scratch. By providing a set of pre-written code blocks, Parsons problems allow students to focus on the logical structure of the program.
- They can be used to teach problem-solving and critical-thinking skills. By rearranging code blocks to solve a problem, students must analyse the logic of the program and think about how different pieces of code fit together.
- They can be used to assess students’ understanding of programming concepts in a more interactive and engaging way than traditional assessments such as multiple-choice quizzes.
Parsons problems can be easily modified to suit different skill levels and learning objectives.
# Parsons Problem - Python While Loops # Rearrange the lines of code below to create a program that will print the numbers from 1 to 10. print(n) n = 1 while n <= 10: n = n + 1
The above question doesn’t include any indentation. This could be included as more scaffolding.
print(n) n = 1 while n <= 10: n = n + 1
Which of the above are you more likely to provide to students?
# Solution n = 1 while n <= 10: print(n) n = n + 1
Try the following interactive problem:
If viewing on a mobile device, these interactive examples may not function correctly within the mobile browser.
A quick fix for this is by requesting the desktop version of the site.
In Chrome tap the three dots top right and the choose desktop site.
In Safari tap the AA button in the address bar and choose request desktop website (or mobile if that option isn’t available, as this appears to work on the iPad).
- Evaluating the Effectiveness of Parsons Problems for Block-based Programming
- Programming Pedagogy in Secondary Schools: Inspiring Computing Teaching (FutureLearn Course)
- The Big Book of Computing Pedagogy, p71
*Please note that AI had significant input to this blog post.