 |
We've just released a few new functions for use in writing questions.
---------------------------------------------------
Greatest Common Divisor & Least Common Multiple
---------------------------------------------------
These common math functions are now available for use.
Both functions can take two or more input values:
<eqn gcd(55, 595, 10)> will return 5, for example.
<eqn lcm(14, 77)> will return 154.
-----------------------------------------
Displaying a (random) number with commas.
-----------------------------------------
Sometimes it is useful to randomize a large number, but display it to
students with commas for readability.
For example consider 12,000,000 versus 12000000 -- easier to read and
understand quickly.
You can now display random numbers this way using the function commas().
Example:
<eqn $x=1e5*randnum(20,70,1); commas($x)>
Note that commas() -- just like scinot() -- returns a string of text and
not an actual number... therefore you would *not* want to try something
like the following if you were planning to use the variable $x later in
a calculation:
<eqn $x=commas(1e5*randnum(20,70,1))> (Danger!)
-----------------------------------------------
Happy holidays!
The WebAssign Team
|