yvnggang6706 yvnggang6706
  • 21-11-2017
  • Computers and Technology
contestada

"write a program to simulate the rolling of two six-sided dice. the program should work by generating two random numbers, each in the range of 1 to 6, to represent the two dice"

Respuesta :

vjagan vjagan
  • 21-11-2017
Python:

from random import randint
dice_1 = randint(1, 6)
dice_2 = randint(1, 6)

Java:

int dice1 = (int) (Math.random() * 7);
int dice2 = (int) (Math.random() * 7);
Answer Link

Otras preguntas

The temperature danger zone is:*
inez waters her plants every two days she trim them every 15 days she did both today when will she do both again
A people-moving conveyor-belt moves a 600-newton person a distance of 100 meters through the airport. a. How much work was done? b. The same 600-newton person l
what is .02439 repeating as a fraction
The temperature danger zone is:*
What are the four basic parts found in all cells?
What word describes what people do when they spread out and live in almost every land area of the world?
Solve the inequality. -z+20>z+20
Find the area of a triangle with vertices of A(3, 3), B(5, 4), and C(0, 2).
what does it mean when someone is said to ''rust out''?