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
Lyrx [107]
2 years ago
12

I need help. People who know computer science. I have selected a word from the first 1000 words in my dictionary. Using the bina

ry search algorithm, how many questions do you have to ask me to discover the word I have chosen?
a. 8 b. 10 c. 12 d. 14
Computers and Technology
1 answer:
Rudiy272 years ago
8 0

Answer:

14

Explanation:

You might be interested in
Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file
Rama09 [41]

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

#include <fstream>  //to manipulate files

using namespace std;  //to identify objects like cin cout

int main(){  //start of main function

  ifstream file;   //creates an object of ifstream

   file.open("random.txt"); //open method to open random.txt file using object file of ifstream

       

    int numCount = 0;  //to store the number of all numbers in the file          

    double sum = 0;   //to store the sum of all numbers in the file

    double average = 0.0;   //to store the average of all numbers in the file

    int number ; //stores numbers in a file

                 

        if(!file){   //if file could not be opened

           cout<<"Error opening file!\n";    }   //displays this error message

       

       while(file>>number){   //reads each number from the file till the end of the file and stores into number variable

           numCount++; //adds 1 to the count of numCount each time a number is read from the file          

           sum += number;  }  //adds all the numbers and stores the result in sum variable

           average = sum/numCount;  //divides the computed sum of all numbers by the number of numbers in the file

     

       cout<<"The number of numbers in the file: "<<numCount<<endl;  //displays the number of numbers

       cout<<"The sum of all the numbers in the file: "<<sum<<endl;  //displays the sum of all numbers

       cout<<"The average of all the numbers in the file: "<< average<<endl;  //displays the average of all numbers

       file.close();     }  //closes the file    

   

Explanation:

Since the random.txt is not given to check the working of the above program, random.txt is created and some numbers are added to it:

35

48

21

56

74

93

88

109

150

16

while(file>>number) statement reads each number and stores it into number variable.

At first iteration:

35 is read and stored to number

numCount++;  becomes

numCount = numCount + 1

numCount = 1      

sum += number; this becomes:

sum = sum + number

sum = 0 + 35

sum = 35

At second iteration:

48 is read and stored to number

numCount++;  becomes

numCount = 1+ 1

numCount = 2    

sum += number; this becomes:

sum = sum + number

sum = 35 + 48

sum = 83

So at each iteration a number is read from file, the numCount increments to 1 at each iteration and the number is added to the sum.

At last iteration:

16 is read and stored to number

numCount++;  becomes

numCount = 9 + 1

numCount = 10    

sum += number; this becomes:

sum = sum + number

sum = 674 + 16

sum = 690

Now the loop breaks and the program moves to the statement:

       average = sum/numCount;  this becomes:

       average = 690/10;

       average = 69

So the entire output of the program is:

The number of numbers in the file: 10                                                                                                           The sum of all the numbers in the file: 690                                                                                                     The average of all the numbers in the file: 69

The screenshot of the program and its output is attached.

5 0
3 years ago
An organization is concerned with the amount of sensor data that is being generated locally, analyzed in the cloud, and returned
Sonja [21]

Answer:

Fog computing

Explanation:

Fog computing or fogging is an decentralized architecture that resides between the cloud and the data source. Fog brings the cloud closer to the data source, that is, it brings resource exploitation, security polices and operational cost closer to the data source.

In our scenario, with fogging in place, the generated sensor data will be preprocessed closer to the local site. The data will preprocessed faster and the quality of the processed data will be greatly increased.

3 0
3 years ago
Real estate management software
andre [41]

Answer:

nTireFM

Explanation:

is a comprehensive system for real estate vendors with unique and reliable needs. Real Estate Management Software simplifies your life as a real estate investor monitors the financial performance of each rental property

5 0
10 months ago
Identify the type of error.<br> print "hello"<br><br> num = 5 / 0
horrorfan [7]

Answer:

Syntax error

Explanation:

This is a type of error that occurs when there is a problem with the code that makes it unable to compile and execute.

For example, making a conditional statement without using the correct parameters will result in a syntax error.

4 0
2 years ago
Read 2 more answers
____ of risk is the choice to do nothing to protect an information asset and to accept the outcome of its potential exploitation
umka21 [38]

Answer:

b. Acceptance

Explanation:

<em>"Acceptance </em><em>of risk is the choice to do nothing to protect an information asset and to accept the outcome of its potential exploitation.  </em><em>"</em>

<em>Acceptance Control </em>is important as a strategy when an organization has accomplished a determined level of risk, or it has estimated potential damages that might happen due to attacks, or the organization has developed a thorough analysis related to cost benefits, or it has also evaluated the probabilities of attacks.

7 0
2 years ago
Other questions:
  • Read the spreadsheet formula below, then answer the question.
    14·2 answers
  • How do media and networks interact
    11·1 answer
  • The most common type of local correction system is
    11·1 answer
  • To see all of the records at once, you should use _______ view. 
    12·2 answers
  • Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
    6·1 answer
  • Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another vari
    15·1 answer
  • Which is the hanging indent on the ruler?
    10·2 answers
  • . An access specifier is one of three keywords:
    14·1 answer
  • According to the video, which tasks do Police Patrol Officers perform? Select all that apply.
    15·2 answers
  • Select the correct answer. Who takes care of the final layout of the product that meets the standards set by UX designers? A. we
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!