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]
2 years ago
13

What does the following code segment do?

Computers and Technology
1 answer:
vampirchik [111]2 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
Precautionary measures to be observed when using ICT tools​
Dafna11 [192]

Answer:

ICT is the abbreviated form of Information and Communication. It included different technologies like mobile phones, computers, USBs etc.

Following are two precautionary measures which should be observed when using any kind of ICT:

  1. Use of Antivirus: It can used to protect anything placed inside the technology especially from hacking and viruses which can create many issues.
  2. Backup Data: Creating a backup of the data stored in the device is important as it can be recalled when the device malfunctions. Backup of the data can be created through using USBs, CDs etc or through cloud storage
7 0
3 years ago
The Turing test consists of a person asking written questions of a person and a computer. If the questioner can't tell which one
Juliette [100K]

Answer:

intelligence

Explanation:

According to my research on information technology, I can say that based on the information provided within the question if this happens then we can say that the computer has attained intelligence. This is because this is a test developed by Alan Turing in 1950, in order to observe a machine's ability to exhibit intelligent behavior equal to, or indistinguishable from, that of a human.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Write a program to change background colour of your visual basic form with any 3 different events.​
Stels [109]

Answer:

To change the background color, select the form in Visual Studio and locate the BackColor property in the Properties panel. There are a number of ways to specify a color. Color by name - Simply type in a color name into the BackColor value field (for example Red, Yellow, Cyan etc).

Explanation:

4 0
3 years ago
Read 2 more answers
RDBMSs enforce integrity rules automatically. <br> a. True<br> b. False
IRINA_888 [86]

It is true. RDBMS enforce integrity rules automatically. Integrity rules are automatically enforced by RDBMSs.

Integrity rules are automatically enforced by RDBMSs. Because it contains the design choices made regarding tables and their structures, a data dictionary is frequently referred to as "the database designer's database." Any character or symbol intended for mathematical manipulation may be contained in character data.

Data points that are connected to one another are stored and accessible in a relational database, which is a form of database. The relational model, an easy-to-understand method of representing data in tables, is the foundation of RDBMS. Each table row in a relational database is a record with a distinct ID known as the key.

It is simple to determine the associations between data points because the table's columns carry the properties of the data and each record typically has a value for each property.

To know more about RDBMS click on the link:

brainly.com/question/13326182

#SPJ4

8 0
1 year ago
public class Questions { public static void main(String[] args) { System.out.print("Here "); System.out.println("There " "Everyw
In-s [12.5K]

Answer:

The output of this code can be given as follows:

Output:

Here There Everywhere

But notin Texas

Explanation:

In the give java code a class "Questions" is defined inside this class the main method is defined in the main method we use three print function that can be described as follows:

  • In the first print function, we print the message that is "Here".
  • In the second and third print function, we use println that print data or message in the next line that is "There Everywhere" and in the next line  "But not" and "in Texas".
6 0
3 years ago
Other questions:
  • When one block is executed after another block in order from top to bottom, this is called ______ (see picture) Question 31 opti
    8·1 answer
  • Create an instance of your queue that accepts java.lang.String Objects. Starting with an empty queue, use the enqueue(E e) metho
    15·1 answer
  • Answer these two if u can❤️
    5·2 answers
  • Given the code segment below, complete the assignments as stated in the comments. struct aaa { int m; int nn; } struct bbb{ stru
    13·1 answer
  • A(n) __________ is a server with the original copy of the data that others need.
    12·1 answer
  • SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Assume that the classes listed in the Java Quick R
    9·1 answer
  • A trust domain is defined as Select one: a. The agreed upon, trusted third party b. A scenario where one user needs to validate
    5·2 answers
  • What does a computer need from people in order to solve problems effectively?
    9·1 answer
  • PLEASE HELP THANK YOU
    7·1 answer
  • A _____________ delivers all the files that form web pages
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!