1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
andrey2020 [161]
3 years ago
10

"write a program to simulate the rolling of two six-sided dice. the program should work by generating two random numbers, each i

n the range of 1 to 6, to represent the two dice"
Computers and Technology
1 answer:
ehidna [41]3 years ago
5 0
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);
You might be interested in
What is an example of a condition controlled loop? What would the syntax look like?
irina1246 [14]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

WHILE loops and DO WHILE loops are called the condition controlled loops. The execution of these loops depends on a certain condition, when the condition is true, the loop body will be executed and when the condition becomes false, the loop body will not be executed. the major difference between both loops is given below.

In the WHILE loop,  the condition is checked at the beginning of the loop whereas in the do-while loop condition is checked at the end of the loop and, in the do-while loop, the loop body is executed at least once.

The syntax of the while loop is given below

while (condition) {

 // code block to be executed

}

The syntax of do-while loop is given below

do {

 // code block to be executed

}

while (condition);

6 0
3 years ago
I do not know what I am supposed to do someone help please.​
Mamont248 [21]

Answer:

The expatiation about errors and their solutions is given below in explanation section

Explanation:

Variables and functions Declaration Error:

In this program, variables are not declared properly according to the programming rules.

  • var size of color

i.e. the variable " size of color" has space between words, the proper declaration of this variable is to omit the space between the words e.g. sizeOfColor.

  • var 1dimension

Some programming language restricts to declare a variable that starts with numbers. Please write this variable in this way: var dimension1.

  • fill() function

fill function is not properly declared and initialized. two errors are in this function. one, this function is using curly bracket "{}" instead of small bracket "()". the second error is, you are passing it string value while it is expecting integer value. the solution is: remove the curly bracket and put a small opening and closing brackets at the place of curly brackets and assign integer value.

  • eclipse function

in the eclipse function, the way of assigning variables is incorrect. for example the variable "size of color" has space between words and variable "1dimension" is started with a number.

6 0
4 years ago
What is the name for the last word on a dictionary page?
kakasveta [241]

Answer:

bbbbbbbbbbbbbbbbbbbbbbbb

Explanation:

bbbbbbbbbbbbbbbbbbbbbbbbb

8 0
3 years ago
The physical components of information technology, which can include the computer itself plus peripherals such as storage device
yarga [219]
The correct answer should be Hardware
8 0
3 years ago
Name 2 ways that body temperature can be taken.​
Zigmanuir [339]

Answer:

Under the armpit, which is called the axillary method, and also through mouth, which is called the oral method.

Explanation:

5 0
3 years ago
Other questions:
  • You have a subnetwork, 192.168.48.0/24. it is divided into subnet a and subnet
    8·1 answer
  • Select the instances in which you should include a comma.
    14·1 answer
  • Choose all that apply.
    6·2 answers
  • For connection to place on any network you must have a set of standards?<br> O True<br> O False
    8·1 answer
  • What happened if the offshore team members are not able to participate in the iterations demo due to timezone/infrastructure iss
    12·1 answer
  • we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines. Which of these queu
    12·1 answer
  • You are the administrator for a small network with several servers. There is only one printer, which is centrally located. Altho
    10·1 answer
  • Write a Python function that join the two string and print it ​
    14·2 answers
  • What is the first step in finding a solution to a problem
    13·1 answer
  • What year was html released?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!