Creating Sets of Parameters

Top  Previous  Next

Some values need to be used together in sets. For example, you may have a question that needs to use one of the sets of Pythagorean triples. This can be done using list references.

 

If you create the following parameters definitions.

 

$ref=range(1,9)

$a=list(3,5,7,8,9,11,12,13,15)

$b=list(4,12,24,15,40,60,35,84,112)

$c=list(5,13,25,17,41,61,37,85,113)

 

You can choose a set of values which are Pythagorean triples using these parameters.

 

Side 1 = $a[$ref]

Side 2 = $b[$ref]

Hypotenuse = $c[$ref]

 

Every time you refresh the parameters, $ref will be updated with a new random value and this will select (by reference) a number from the $a list and the corresponding values from the $b and $c lists.