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
Which of the following describes the term "false information?"
pav-90 [236]
Inaccurate and misleading
3 0
3 years ago
Ayuda por favor.<br><br>Please help!!
rewona [7]

Answer:

I know you're going to delete my answer... But I have an essay which needs to be completed online and I need to ask a urgent question!

If you have a better reason WHY you need me to answer the RIGHT answer... Please reply.

Explanation:

8 0
3 years ago
The concepts of ________________, _________________, and _________________ for covert acts are pivotal to understanding state-on
DIA [1.3K]

The concepts of Power, anonymity and political utility for covert acts are pivotal to understanding state-on-state interactions within cyberspace.

<h3>What is Anonymity?</h3>
  • Anonymity describes cases where the interim person's identity is anonymous.
  • Some writers have argued that anonymity, though technically accurate, does not capture what is more centrally at stake in contexts of anonymity.
  • The essential concept here is that an individual is non-identifiable, unavailable, or untrackable.
  • Anonymity is seen as a technique, or a way of realizing, sure other values, such as solitude, or liberty.
  • Over the past few years, anonymity tools used on the dark web by offenders and harmful users have drastically changed the ability of law enforcement to use conventional surveillance Techni.

To learn more about Anonymity, refer to:

brainly.com/question/28115737

#SPJ4

3 0
1 year ago
Where is the thesis statement usually located in research paper?
Ugo [173]
The thesis statement is typically located in the last sentence of the first paragraph of a research paper.
7 0
3 years ago
Which delivery model is an example of a cloud computing environment that provides users with a web based email service ?
Evgen [1.6K]

Cloud computing, also known as cloud services, cloud concepts or simply the cloud, is a paradigm that allows to offer computer services. through a network, which is usually the Internet.

(data persistence, authentication, messaging, etc.). for example, a Linux system, a web server, and a programming environment such as Perl or Ruby).

Commercial examples are Google App ,Microsoft Azure,

3 0
3 years ago
Read 2 more answers
Other questions:
  • If reading or writing a cache line of size 64 bytes to Flash requires 2.56 μJ and DRAM requires 0.5 nJ, and if idle power consum
    9·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Name one app that currently has a positive impact on society and explain why you think it has had a positive effect.
    10·1 answer
  • Software applications called _____ provide the means to record information that passes through a computer or router that is hand
    10·1 answer
  • You are creating a presentation and you have come to the last slide. You still have more information to add. What should you do?
    7·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • What in the world is this for and how do you use it
    8·2 answers
  • Please help
    11·1 answer
  • Can Algorithms Be Used Again?
    8·1 answer
  • In Subtractive empathy, the counselor responses gives back less (or distorts) than what the client has said. slightly add someth
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!