-
Notifications
You must be signed in to change notification settings - Fork 2
Operations
Carlos Linares López edited this page May 23, 2021
·
7 revisions
This page describes the different operations implemented, their types (if any are implemented) and the arguments they acknowledge
A sequence consists just of a sequence of numbers. Currently, the difference between two adjacent numbers is always equal to 1. There are four different types of sequences:
- Type 0: neither the first nor the last element of the sequence are given. Instead, an arbitrary number in between is given as a hint ---but only one, and the rest have to be filled in by the student.
- Type 1: only the first element of the sequence is given, the rest have to be filled in by the student.
- Type 2: only the last element of the sequence is given, the rest have to be filled in by the student
- Type 3: both the first and last element of the sequence are given, the rest have to be filled in by the student.
Note that it is mandatory to provide the type of sequence. Sequences also acknowledge the following arguments which are also mandatory:
- nbitems: number of items in the sequence
- geq: forces all numbers in the sequence to be strictly greater or equal than this lower bound
- leq: forces all numbers in the sequence to be strictly less or equal than this upper bound
The values of these arguments can be given either as strings, int or float numbers.
For example:
{{.Sequence (dict "type" 2 "nbitems" 5 "geq" 0 "leq" 9)}}
generates a sequence of 5 numbers, all greater or equal than 0 and lower or equal than 9, showing both the first and last number.