Use the parsons package to create Parsons problems for teaching progamming. You can create custom questions in your learnr tutorials.

Installation

You can install the released version of parsons from CRAN with:

~~install.packages("parsons")~~

And the development version from GitHub with:

Examples

Parsons problems

A Parsons problem is a specific type of question, useful for teaching programming, where all the lines of code are given, but the student must provide the correct order.

The parsons() function has experimental support for parsons problems.

You can add a parsons problem to a learnr tutorial with the question_parsons() function: