Answer each of the following questions.

a) What does it mean to choose numbers “at random?”
b) Why is the Math.random function useful for simulating games of chance?
c) Why is it often necessary to scale and/or shift the values produced by Math.random?
d) Why is computerized simulation of real-world situations a useful technique?


a) Every number has an equal chance of being chosen at any time.
b) Because it produces a series of random numbers.
c) To produce random numbers in a specific range.
d) It enables more accurate predictions of random events such as cars arriving at toll booths and people arriving in lines
at a supermarket. The results of a simulation can help determine how many toll booths to have open or how many cashiers
to have open at a specified time.

Computer Science & Information Technology

You might also like to view...

The ____________ window in the debugger displays a list of all variables in the current procedure.

a. inspector b. watch c. locals d. autos

Computer Science & Information Technology

What is the Big-O of a recursive bubble sort?

a. O(n^2) b. O(n log n) c. O(n) d. O(n^3)

Computer Science & Information Technology

Help is ____________________ in that it displays topics and instructions geared to the task you're performing.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following statements about formatting is not true?

A. Formatting deletes the master boot record. B. Formatting permanently deletes the files on a disk. C. Formatting deletes the operating system address table. D. All the above are true.

Computer Science & Information Technology