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
OLga [1]
3 years ago
13

What does the following code segment do?

Computers and Technology
1 answer:
vampirchik [111]3 years ago
4 0

Answer:

Hi!

var count =0;  <em>//initialize count.</em>

var sevens =0 ;  <em>//initialize sevens.</em>

while(count<100)  <em>// loops while count is minor than 100. *counts never add 1 at the final of the loop, so this while is always true. </em>

{

<em>//Math.floor(x) round to the max Integer a number. Example : 45.90 -> 46.</em>

<em>//Math.random() returns a number between [0, 1).</em>

var roll1 = Math.floor(Math.random()*6+1);   <em>//Gets a integer using Math.random(), adds 1, and round it withMath.floor() then saves in roll1.</em>

var roll2 = Math.floor(Math.random()*6+1);  <em>//Gets a integer using Math.random(), adds 1, and round it withMath.floor() then saves in roll2.</em>

if(roll1 + roll2 == 7) <em> //If the sum of roll1 and roll2 is 7 adds 1 to sevens.</em>

sevens = sevens +1;  

}

<em>//*count is not incremented, so while(count<100) -> always true.</em>

You might be interested in
You work in a customer call center. Martin is on the phone asking about the difference between solid-state drives (SSDs), hybrid
Lostsunrise [7]

Answer:

the hybrids will be better

7 0
3 years ago
Quick!! Im taking a timed test so pls hurry!! Ill even mark as brainliets!!
Ksju [112]

Answer:

-He has a lot of experience.

Explanation:

Bill has little experience and Sam has a decade of on the job training. Therefore Sam is more experienced

8 0
3 years ago
Read 2 more answers
What type of task can be defined to allow you fine-grained control over the management tasks a user can perform in an OU
erma4kov [3.2K]

The type of task can be defined to allow you fine-grained control over the management tasks a user can perform in an OU is custom.

<h3>What is custom priority in Outlook tasks?</h3>

Outlook is known to have a  New Tasks window that often shows a created-in Priority field that has  Low, Normal, and High setting.

This setting above is a custom one and it is one where a person can sort tasks by using its priority level instead of due date. This help to have  more perspective and one can reorganize their tasks when needed.

Learn more about task  from

brainly.com/question/12831236

3 0
2 years ago
6.Decreasing a telescope's eyepiece focal length will:
Ghella [55]
B is the correct answer to ur questions
8 0
3 years ago
A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
Bess [88]
To be honest I feel like it’s B that’s looks and seems the most correct to me
8 0
2 years ago
Other questions:
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • Best value supply chains strive to excel along four measures: speed, quality, cost, and flexibility. Group of answer choices Tru
    10·1 answer
  • The ____ function sums the numbers in the specified range and then divides the sum by the number of cells with numeric values in
    14·1 answer
  • Okay so remember that page I was advertising? At: fol ? Now it's deleted. And idk why because I was doing everything the right w
    7·1 answer
  • In Word, blue underlining indicates which of these problems?
    12·1 answer
  • Differentiate between the broadcasting and telecommunication
    5·1 answer
  • Int a = 1; int b = 0; int c = -1; if ((b + 1) == a) { b++; c += b; } if (c == a) { a--; b = 4; }
    7·1 answer
  • How do I contact an admin
    8·1 answer
  • The computer scientists Richard Conway and David Gries once wrote: The absence of error messages during translation of a compute
    7·1 answer
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!