PremierLangage / Yggdrasil

A PL subproject where we are tackling the design of new types of exercises
4 stars 2 forks source link

Parson's Puzzle programming exercise #26

Open nthiery opened 5 years ago

nthiery commented 5 years ago

Parson's puzzles are programming exercise where the student is given a program with its lines permuted, and need to fix the order to make the program work. Variants includes also fixing the indentation for indentation-based programming language like Python.

See e.g.:

We may want to add such a type of exercise in PremierLanguage. As a crude first approximation, we could add support for line order/indentation randomization in cpp-info111:

    RANDOM_LINE_PERMUTATION(
         for (int i = 0; i < 10; i++)
               if (t[0] == x)
                    return true;
         return false;
    )

cc: @HuxoD142, @hivert

nimdanor commented 5 years ago

@mciissee peut jetter un oeil pour que l'on essaye d'intégrer ces puzzle dans un exercice pl.

nthiery commented 5 years ago

Nothing urgent: the main purpose is to spread and keep a reference to some fun things other people are doing for programming education.