Using
Random
Numbers
and
Mathematical
Functions:
RND,
+,
-,
*,
/
In
itially computers were developed
to
process numbers quickly and easi
ly.
To
take advantage of the computer's ability to calculate a math answer
in
a few milliseconds, you must know how to speak to a computer.
NUMBERS
Type the statement below and press IReturnl :
PRINT
H'
The computer should pr
in
t the number 10. Make sure you use the
numerals 1 and 0, not letters. Practice printing the fo
ll
ow
in
g numbers:
PRINT
J.999999999
PRINT-J.99999999
Use the minus sign
(-)
on
the Up Arrow key
~
to indicate negative
numbers. Do not use commas
in
numbers. Type the statements below
to see what happens when commas are used:
PRINT
~
..
876
..
543
..
2J.9
PRINT
~
..
876
..
543
..
2J.9
In
both exampl
es,
the computer interprets the commas as separators
in
a series of numbers. It spaces the numbers out across the screen
according to its preset tab positions.
To
the computer, the 9
is
not 9
billion, just the number 9 fo
ll
owed by a
se
ri
es of other numbers.
SCIENTIFIC NOTATION
The computer may not understand commas when it prints numbers,
but it does understand exponents. Often it will automatical ly translate
a large number into
an
exponential form . Try the numbers below:
PRINT
~~~~~~~~~~~
PRINT
55555555555
PRINT
J.J.J.J.J.J.J.J.J.J.J.
PRINT-J.J.J.J.J.J.J.J.J.J.J.
PRINT-~8765
432J.J.2
47