What is the maximum number of guesses it will take to find a number between 1 and 1000? Explain your answer.

Answers

Answer 1

Answer:

The maximum number of guesses without binary search is 999 since we would be going sequentially and guessing the numbers. When we reach number 999 and find that is not the answer, we know it has to be 1000, and don't have to guess, so the number of max guesses is 999.

Answer 2

The maximum number of guesses to find a number between 1 and 1000 is 10, using a binary search algorithm. Each guess divides the search range in half until the number is found.

Given that,

The number we are trying to find is between 1 and 1000.

We are trying to determine the maximum number of guesses it would take to find this number.

To find the maximum number of guesses it would take to find a number between 1 and 1000, we can use a binary search algorithm.

In a binary search, we start by guessing the middle number, which in this case would be 500.

If the number we are looking for is higher than 500, we then guess the middle number between 501 and 1000, and so on.

If it's lower, we guess the middle number is between 1 and 499, and so on.

Using this approach,

As dividing the problem in half with each guess. Since we have 1000 possible numbers and we divide by 2 with each guess,

It would take a maximum of log base 2 of 1000 (or approximately 9.97) guesses to find the number.

Therefore, we can conclude that the maximum number of guesses it would take to find a number between 1 and 1000 using this binary search algorithm is 10.

To learn more about number system visit:

https://brainly.com/question/33311228

#SPJ3


Related Questions

hi please help ASAP it's about html!​

Answers

Given :-

Create a HTML code for writing a web page for your school time-table.

Answer :-

<html>

<head>

<title> Time Table </title>

</head>

<hrcolor = "red">

<hrcolor = "blue">

<body>

<table><tr = "7"><md = "7"><Period 1_></table>

</body>

</html>

[tex] \\ [/tex]

Answered by - ItzMaster

Software is:

A. storage-related information technology.

B. programs that help hardware accomplish tasks.

C. the opposite of firmware.

D. all of the above.

Answers

I think the answer is A

To register your content with the US Copyright Office, visit copyright.gov to get started. Online
registration usually costs between _____ and _____, and you'll have to send a copy of your completed
work to the U.S. Copyright Office either through the mail or via its website. Once your work is
registered, it will be added to the Library of Congress.
$35 and $55
O $25 and $65
O $15 and $35
O $85 and $105

Answers

Answer:

$35 and $55

Explanation:

Online registration usually costs between $35 and $55 , and you'll have to send a copy of your completed work to the U.S. Copyright Office either through the mail or via its website. The correct option is 1.

What is Copyright?

Copyright is a legal concept that grants creators of original works, such as literary, artistic, musical, and other types of intellectual works, exclusive rights.

These rights give the creators the ability to control how their works are used, distributed, and reproduced, as well as receive monetary compensation for their use.

Depending on the type of work and the filing option selected, online registration with the United States Copyright Office typically costs between $35 and $55 for a single work.

It should be noted that these fees are subject to change, and that additional fees may apply for specific services such as expedited processing or special handling.

Thus, the correct option is 1.

For more details regarding copyright, visit:

https://brainly.com/question/22399852

#SPJ6

Your question seems incomplete, the probable complete question is:

To register your content with the US Copyright Office, visit copyright.gov to get started. Online

registration usually costs between _____ and _____, and you'll have to send a copy of your completed

work to the U.S. Copyright Office either through the mail or via its website. Once your work is

registered, it will be added to the Library of Congress.

$35 and $55$25 and $65$15 and $35$85 and $105

You manage Windows desktops for your organization. You recently updated all of your workstations to Windows 10. Your organization relies on a particular application, which worked correctly on Windows 7, but now does not run in Windows 10. You have checked the application vendor's website, but they do not provide a Windows 10 update. What are your options for running the application

Answers

Answer:

The options for running a Windows 7 application on Windows 10 are;

1) Run the compatibility troubleshooter

2) Reinstall the app

Explanation:

The most recent version of Windows 10 supports the majority of applications made for versions of Windows before Windows 10, however, in the event that an application does not run on Windows 10 the options available for running the application are;

1) Run the compatibility troubleshooter as follows;

a) Type the application's name in the tax bar search box

b) In the menu showing the application that comes up, right click on the application's name and select the "Open file location option" from among the options menu

c) In the file location, locate and right click the program file which is the .EXE file and select "Properties" from the options menu. In the Properties dialogue box, select the "Compatibility mode"

d) In the "Compatibility mode" tab, select "Run compatibility troubleshooter"

2) Reinstall the app

a) With the app not yet installed on Windows, in the setup files location of the application, right-click the setup .MSI or .EXE application file

b) In the options menu select "Properties" and then the "Compatibility" tab in the "Properties" dialog box

c) On the Compatibility tab select the "Run this program in compatibility mode for" checkbox and select Windows 7 as your desired Windows

d) Click Ok.

In which phase of website design does the designer create a mock-up aimed at the target user? A. learning B. planning C. design D. development E. testing and delivering

Answers

Answer:

C. design

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations that a web page displays.

In the design phase of a website design, the website designer create a mock-up aimed at the target user. A mock-up is a graphical representation or illustration of a graphic design and as such isn't responsive.

This ultimately implies that, a mock-up or model can be used by a website designer to illustrate or show the target user the look and feel of a website, so as to help these users have a better understanding of the specific elements and structure associated with it.

Sigma Technology is a company based in Singapore, with branches in 24 countries. It needs multiple CAs in different locations to verify and sign digital certificates for the company. They are looking for an option where, even in the absence of a CA, other CAs can issue the certificates. Additionally, they are also looking for CAs who will overlook other CAs in different locations. In such a scenario, which PKI trust model should they use

Answers

PKI trust model that should be used, is a distributed trust model.

A distributed trust is a trust model that gives power to different source while taking the power away from a single source and thereafter, shares that responsibility to the wide range of sources. It is important as it allows trust to flows through network, marketplaces and forums.

With the use of this distributed trust model, Sigma Technology can have multiple CAs in different locations to work on behalf of the company. And even if one is absence, other CAs can still issue certificate without any hindrances.

Conclusively, we can say that PKI trust model that should be used is a distributed trust model.

Learn more from:

https://brainly.com/question/14837773

When comparison shopping, all of these hint at a good deal EXCEPT_____________________.

Answers

Answer:

lower-priced models offer more features

Explanation:

Drag the tiles to the correct boxes to complete the pairs. Match the conversion systems with their steps. To convert a decimal fraction into its hexadecimal form to convert a hexadecimal number into its decimal form to convert a binary number into its hexadecimal form to convert decimal fraction into its hexadecimal form Divide each digit on the right side of the decimal point by the sum of different powers of 16. ArrowRight Use the decimal number system as an intermediary. ArrowRight Divide the left side of the decimal by 16, and multiply the right side by 16. ArrowRight Use repeated division and multiplication.

Answers

Answer:

1

Explanation:

A restaurant is interested in learning about the food preferences of people living nearby to the restaurant and intends to use survey data to help decide which new items to add to the menu. Which of the following is LEAST likely to be part of the process used to analyze the data?

a. Cleaning a data visualization to remove unwanted patterns.
b. Iteratively creating visualizations to ask and answer new questions.
c. Cleaning data to remove inconsistencies.
d. Filtering the data to look at the responses from only certain groups.

Answers

Answer:

answer is d

Explanation:

i got it right in code.org

Answer:

A. Cleaning a data visualization to remove unwanted patterns.

Explanation:

While cleaning data in its raw format can be an important part of the Data Analysis Process, the visualizations are not cleaned and/or altered but rather they are interpreted to discover what patterns exist in the data.

*If one is in search of a pattern, why would one clean or alter the pattern they have been provided, self-sabotage.*

Fill in the blank!!!!!!!!!!!!!!!!!!!! ASAP!! Please!!!
Recent improvements in __________ have increased the pace of globalization.

Answers

i think it is technology

so I believe that the word you are looking for is technology

Hope this helps

-scav

Games for which of these devices have the lowest graphical quality and computing requirements? ASAPP!!!!!
A. PDAs
B.handheld consoles
C. tablets
D.smartphones
E. feature phones

Answers

Answer: A. PDAs

Explanation:

Personal Digital Assistants (PDAs) allowed for a user to carry out computational tasks such as calendars and planning in the time before smartphones. They were extremely useful to business people.

They did not however, have the best graphics for running games. This meant that any games on a PDS would be of pretty low graphic quality and require low computing requirements as well.

Answer:

A - PDA

Explanation:

PLATO

How might you develop a game where players need strong twitch skills in a way that still makes the game fun for players of all skill levels and abilities?

Answers

Answer:

here ya go

Explanation:

I would suggest either having a default difficult being easy, and if people want to be challenged they can increase it, or try to balance how much of the game requires strong twitch skills.

In python please!! Write the definition of a function named countPos that needs integer values from standard input until there are none left and returns the number that are positive. The function must not use a loop of any kind.

Answers

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

After hacking into atm systems remotely using a laptop, What attacker worked with the atm manufacturers to resolve the identified security vulnerabilities

Answers

grey hat hackers are those after hacking into ATM systems remotely using a laptop, works with the ATM manufacturers to resolve the identified security vulnerabilities

A grey hat hacker is simply known as an hacker that falls between the range of black and white hacker. They are known to illegally break into systems so as to show off their skills to the administrator of the system they penetrated or to seek to sell their services in repairing security breaches.

In the ATM case, they attacked it and then also want the ATM manufacturer to use their service.

Conclusively we can therefore say that the hacker was a gray hat hacker.

Learn more from

https://brainly.com/question/15899195

Hardware failure, power outages, and DOS attacks will affect:

data confidentiality.

data integrity.

data verification.

data availability.

Answers

Answer:

The answer should be data availability

Is a dot matrix printer an impact or non-impact printer

Answers

i think a non impact printer

Answer:

Impact

Explanation:

_______________is the career cluster that medical professionals are under.

Answers

I think the answer is Doctor ?

Type the correct answer in the box. Spell all words correctly.
Alan maintains the efficiency of a printing plant by supervising plant operations and implementing safety procedures. What does he work as?
Alan is working as a _____________.

Answers

Answer:

Alan is a Maintenance Supervisor.

Explanation:

Answer:

printing plant manager

Explanation:

What is the difference between a filter and a Search Folder?

*manually & *on demand

Answers

Answer:

manually and on demand is correct

Explanation:

20 POINTS-
can someone help with this?

Answers

Answer:

large storage= data warehouse

data from daily= world wide

data storaage= transactional

online data= relational

I rlly don't know I'm kinda guessing here for don't take my word to heart it's been a bit since I've learned this

Two parter:

A.) What is wrong with the program segment below? The program does not contain syntax errors.

B.) Fix the programming error(s)

num = 1;

while (num < 9)
{
cout << num;
num = num - 1;
}

Answers

Answer:

the variable num is not declared so the compiler doesn't define it.

add int before num:

int num = 1;

while (num < 9)

{

cout << num;

num = num - 1;

}

now the code will run but it won't stop as it will never break the condition (num < 9).

PLEASE HELP ME ASAP I HAVE AN EXAM SOON!!!!

My ET-2600 printer isn't working. Black and white pages aren't printing, and if I try to print a BW page, it only print a blank sheet of paper.

How to fix?! I have checked the nozzle thingy on the app.

Answers

Answer:

try seeing if the nozzle of the cartridge is clogged

Explanation:

Briefly explain the main difference between how to connect a new office computer in the SHSS office to the internet and how to connect a standalone computer in your house to the internet

Answers

Answer:

Once you've set up your computer, you may want to purchase home Internet access, up a home wireless network, commonly known as Wi-Fi, so you can connect multiple. Now that you know about the different types of Internet service, you can do. The primary piece of hardware you need is a modem.

can someone tell me what to do i’m kinda stuck and don’t know what he’s telling me to do pls ill give brainlist and points

Answers

Answer:

Well a debtor is basically someone owing someone money, basically someone in debt. He’s telling cup head boy to take care of the people who owe him or someone else their or his money. Thats basically it.

Examine the weather map.

A weather map of the United notes. The following are shown on the map: major cities with high and low temperatures; high and low pressure systems; types of precipitation, fronts.

Which weather forecast would be accurate based on this weather map?

Rain is expected in Billings.
It will be cold in Atlanta.
Miami will have sunny weather.
Minneapolis will be stormy.

Answers

Answer:

A. Rain is expected in Billings.

Explanation:

Rain is expected in Billings would be accurate based on this weather map.

What is Weather map?

A weather map is a map of the world or a portion of it that uses symbols to depict the weather conditions at a given time, including temperature, pressure, wind speed and direction, humidity, clouds, visibility, and type and amount of precipitation.

The trained observers record the temperature, pressure, wind speed and direction, cloud cover, and precipitation amounts in observatories and meteorological stations. Using symbols, these observations are entered on a weather map. '

'

As a result, a weather map shows the weather factors for a region at a specific time that are denoted with recorded symbols. It makes the current weather conditions clear.

Therefore, Rain is expected in Billings would be accurate based on this weather map.

To learn more about weather map, refer to the link:

https://brainly.com/question/1674348

#SPJ3

how important the role of valet and butler service in the hospitality

Answers

very important bc they help you with what you need.

put true or false..

1. Static web pages cannot be edited or visitor makes any handle with them. ( )

2. Name attribute used for display a text on the button. ( )

3.submit button used to clear input fields from any previous data ( )

4.HTML language isn't enough to make a confirmation to the data entry ( )​

Answers

1.) False

2.) False

3.) False

4.) False

Write a JavaScript program to create a multiplication table for numbers 1 to 12 using a while loop. I’ll mark brainliest, thanks

Answers

Answer:

</p><p>

</p><p>days1(); // calling function days1()

</p><p>

</p><p>function  days1() // function days1

</p><p>

</p><p>{

</p><p>

</p><p>var  week = ["sunday ", "monday ", "tuesday "," wednesday"," thursday",

</p><p>

</p><p>"friday"," saturday"];

</p><p>

</p><p>var i;

</p><p>

</p><p>for (i=0;i<7;i++)  // iterating over the loop

</p><p>

</p><p>{  

</p><p>

</p><p>document.write(" The number of days in a week :" +</br>);

</p><p>

</p><p>document.write( week[i] + "</br>" );  // print the number of days

</p><p>

</p><p>}

</p><p>

</p><p>}

</p><p>

</p><p>

Output:

The number of days in a week :

sunday

monday

tuesday

wednesday

thursday

friday

saturday

Explanation:

In this program, we create a function days1().In this function, we declared an array i.e "  week " which will store the list of the days of the week. After that, we iterate the for loop and prints a list of the days of the week.

which email attachments are generally safe to open

Answers

Answer:

i would suggest not opening ones that start with bit . ly

Explanation:

pls mark brainliest

Anything starting in https://

PLEASE HELP WILL GIVE BRAINLIEST

Answers

Answer:

Explanation: answer is b) the row comes first  in the  element of an index

Other Questions
North Dakota is just south of ___________.South DakotaWashingtonCanadaMinnesota Solve for x. Round to the nearest tenth. 29 12 HURRY PLEASE FREE BRAINLIESTDescribe the main idea of the document. Summarize in 4-5 sentences.DOCUMENT BELoW How does paragraph 5contribute to the development of the story?A. It shows Ivan was trying to be brave.B. It shows why the men make fun of Ivan.C. It shows that Ivan does not care what the men think.D. It shows that Ivan will not complete the lieutenants challenge. If y varies directly as x and x=6 when y = 3 what will y be when x = 10 PLEASEEE SOMEE FAST PLSSS HELPPPPPPPP MEE PLSSSSSSSSSSSSSSSSSSSSSSSSSS please change the verb in the parentheses to the correct preterite form to match the subject .Uds._______(trabajar) mucho el otro da. If you answer this you are pog and get A 0.530 M Ca(OH)2 solution was prepared by dissolving 36.0 grams of Ca(OH)2 in enough water. What is the total volume of the solution thus formed? (4 points) What does this excerpt reveal about Remeos character? solve and graph the following inequalities a. x + 3 - 8 + x c. x + 81 < 160 Choose one piece of art shown in the unit. In about two paragraphs, create an art critique for this piece of art.A Mesopotamian votive dog statuetteTemple of Ramses IIThe Palette of NarmerA sunk relief image of Pharaoh Akhenaten, Nefertiti, and their children.The Great Sphinx of Gizaif you are confused on how to see the pictures, copy and paste the words in the search bar and it will show you the picture. Brainiest for the best answer! Someone please help me !!! HELPPPPP!! NO LINKS OR WILL BE REPORTED! DONT ANSWR JUST FOR POINTS!! WILL GIVE BRAINIEST! Some suggestions for measures that the United States can implement to avoid contributing to greenhouse gases! Triangular trade routes involved shipments of raw materials, finished goods, and enslaved American Indians. Africans. Asians.Europeans. Spanish: Un tratado internacional (Convenio de Basilea) prohbe exportar residuos al tercer mundo o pases subdesarrollados. Sin embargo por qu frica sigue recibiendo basura digital? Cmo son declarados los bienes exportados hacia frica para evadir ese tratado internacionalEnglish: An international treaty (Basel Convention) prohibits the export of waste to the third world or underdeveloped countries. Yet why does Africa continue to receive digital waste? How are goods exported to Africa declared to evade this international treaty? Pick me chose me love me NOW HELP ME WITH MATH 1. Which is a chemical property of wood?conductivityflammabilitymalleability John Park lives in Anytown, Missouri. He rents an apartment on Broad Street. He has one credit card with National Bank. He pays the balance on this every month, and he always stays within his $400 spending budget. In addition, he has one student loan, which he defers, since he is a full-time student. He has recently applied for a job at Happy Hamburgers.Based on Johns profile, what information should he expect to find on his credit report? Check all that apply.1. inquiries from his lenders, the apartment complex, and Happy Hamburgers2. a note about delinquency from National Bank3. a current account for his student loan4. a current account with National Bank5. a current account with Happy Hamburgers