subject

What does the following code segment do?
var isseven =false;
while ( isseven==false )
{
var roll1=math. floor(math. random( )*6+1);
var roll2=math. floor(math. random( )*6+1);
if(roll1 + roll2 ==7)
{
isseven = true;
alert(roll1 +"--"+roll2);
}
}
it keeps generating two random numbers of any values until the sum of the two numbers is 7.
it keeps generateing two random numbers between 1 and 6, and adds up the two numbers.
it keeps generating two random numbers between 1 and 6, until the sum of the two numbers is 7.
it keeps generating two random numbers between 1 and 6, then check if the sum of the two numbers is 7.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:40, cutybrain6054
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, xinkyx616
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
image
Computers and Technology, 24.06.2019 19:00, stephanieanaya7
In python a floating-point number must be written using scientific notation?
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, jakhunter354
What does a trademark indicate about a product? a trademark is a sign, symbol, or short phrase that indicates the of a product or service. type the correct answer in the box
Answers: 1
You know the right answer?
What does the following code segment do?
var isseven =false;
while ( isseven==false )<...

Questions in other subjects:

Konu
Mathematics, 27.02.2021 04:30
Konu
Arts, 27.02.2021 04:30
Konu
Mathematics, 27.02.2021 04:30