Describe how random numbers could be used to simulate the roll of a die. How could two dice be simulated using this function?

What will be an ideal response?


Math.floor(7*Math.random()); calling the function twice could simulate two dice.

Computer Science & Information Technology

You might also like to view...

The initializeEventListeners screen is the place where event listeners and their handlers are specified.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The ____ event is triggered by the program.

A. DefaultModelManipulation B. ObjectMover C. SceneActivation D. CollisionStart

Computer Science & Information Technology

Critical Thinking QuestionsCase 1-1Your colleague Frank is editing a friend's novel in Word. To speed up the process, Frank would like to take advantage of the various techniques available for selecting text, and he asks you for help.Frank would like to be able to select a full paragraph. Which of the following techniques will work? a. triple-click the paragraphc. click the paragraphb. double-click the paragraphd. move the mouse to the left of the paragraph and then double-click

What will be an ideal response?

Computer Science & Information Technology

One of the other colors in the color scheme is intended to provide a look of authority and power. What is that color?

a. blue b. yellow-green c. orange d. black

Computer Science & Information Technology