This is a list of commonly used functions in the code portion of the Editor. If you have any questions about how they operate feel free to email us.
Function name | Description | Argument type | Return type | Example | Default answer | Alternate answer |
---|---|---|---|---|---|---|
hws_random(min, max, precision, default) | Generates a random number | numbers | string or double | hws_random(1.00, 5.99, 3, 2.59) | 2.59 | 3.54 |
roundoff(num, precision) | Rounds off a number Note: drops trailing zeros | numbers | string or double | roundoff(4.056, 3) x=4.02 roundoff(x, 2) | 4.06 4 | |
sigfig(num, precision) | Rounds off a number. | numbers | string | sigfig(4.056, 3) x=4.02 sigfig(x, 2) | 4.06 4.0 | |