Skip to main content

Section 4 (4/5) Parsons Puzzles Test

Test Section - Please Read Carefully
You will now complete four Parsons Puzzles. Please remember:
  • Work independently - no help from others or external resources
  • Complete all four puzzles in order
  • Take your time and think carefully
  • Each puzzle has a suggested 10-minute time limit
  • If you cannot solve a puzzle, do your best and move on
  • It’s okay if you can’t solve some puzzles - that helps our research!

Note 4.0.1.

Use the "Check" button only for the Parsons Puzzles. For the survey questions below them, your responses are saved automatically when you select themβ€”no need to click any buttons.
Good luck!

Subsection 4.1 Puzzle 1: Calculate Sum of Positive Numbers

Question 4.1.1.

Arrange the code blocks to create a function called sum_positive that takes a list of numbers and returns the sum of only the positive numbers (numbers greater than 0).
Example: sum_positive([5, -2, 3, -1, 8]) should return 16

Question 4.1.2.

Did you solve this puzzle?
  • Yes, I solved it correctly
  • I tried but could not solve it

Question 4.1.3.

How difficult was this puzzle?
  • Easy - solved quickly
  • Moderate - took some thinking
  • Hard - struggled significantly

Subsection 4.2 Puzzle 2: Find Maximum

Question 4.2.1.

Arrange the code blocks to create a function called find_max that takes a list of numbers and returns the largest number.
Example: find_max([3, 7, 2, 9, 1]) should return 9

Question 4.2.2.

Did you solve this puzzle?
  • Yes, I solved it correctly
  • I tried but could not solve it

Question 4.2.3.

How difficult was this puzzle?
  • Easy - solved quickly
  • Moderate - took some thinking
  • Hard - struggled significantly

Subsection 4.3 Puzzle 3: Count Matches

Question 4.3.1.

Arrange the code blocks to create a function called count_matches that takes a list of numbers and a target value, and returns how many times the target appears in the list.
Example: count_matches([5, 3, 5, 7, 5], 5) should return 3

Question 4.3.2.

Did you solve this puzzle?
  • Yes, I solved it correctly
  • I tried but could not solve it

Question 4.3.3.

How difficult was this puzzle?
  • Easy - solved quickly
  • Moderate - took some thinking
  • Hard - struggled significantly

Subsection 4.4 Puzzle 4: Find First Match

Question 4.4.1.

Arrange the code blocks to create a function called find_first that takes a list of numbers and a target value, and returns True if the target is found in the list, or False if it is not found.
Example: find_first([2, 5, 8, 5], 5) returns True

Question 4.4.2.

Did you solve this puzzle?
  • Yes, I solved it correctly
  • I tried but could not solve it

Question 4.4.3.

How difficult was this puzzle?
  • Easy - solved quickly
  • Moderate - took some thinking
  • Hard - struggled significantly
Congratulations! You have completed all four Parsons Puzzles.
Please proceed to the final feedback survey to share your experience.