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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
When jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor?
Answers: 1
question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display β€œenter a value to be cubed.” input value; set cube = value ^ 3 display value, β€œ cubed is β€œ, cube end while
Answers: 2
question
Computers and Technology, 22.06.2019 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
You know the right answer?
What does the following code segment do?
var isseven =false;
while ( isseven==false )<...
Questions
question
Mathematics, 18.10.2020 14:01
question
History, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
Questions on the website: 13722360