GenSimpleFraction
GenSimpleFraction
GenSimpleFraction[ n ] generates a list of n random simple fractions between 0 and 1.
Usages
GenSimpleFraction[ n ]
GenSimpleFraction[ n ] returns a list of n fractions between 0 and 1, with a denominator from 2 to 11. The fractions are simplified, so 2/4 appears as 1/2. In a script, wrap the command in Simplify. Each time the exercise is generated, new fractions are chosen, so the outputs below are only examples.
| Example | in | out |
|---|---|---|
| Three simple fractions. | Simplify[ GenSimpleFraction[3] ] |
for example {2/3, 6/7, 1/2} |
With n = 1, the result is still a list. |
Simplify[ GenSimpleFraction[1] ] |
for example {7/8} |
Details
- Without
Simplify, the command is not calculated. - Duplicates: the same fraction can occur more than once in the list.
nmust be a positive integer:Simplify[ GenSimpleFraction[0] ]is not calculated.
See also: GenBasicFraction, RandomInt, Simplify