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
anastassius [24]
3 years ago
6

Modify the guessing-game program so that the user thinks of a number that the computer must guess.

Computers and Technology
1 answer:
olga_2 [115]3 years ago
5 0

Answer:

import random

import math

smaller = int(input("Enter the smaller number: "))

larger = int(input("Enter the larger number: "))

count = 0

print()

while True:

   count += 1

   myNumber = (smaller + larger)

   print('%d %d' % (smaller, larger))

   print('Your number is %d' % myNumber)

   choice = input('Enter =, <, or >: ')

   if choice == '=':

       print("Hooray, I've got it in %d tries" % count)

       break

   elif smaller == larger:

       print("I'm out of guesses, and you cheated")

       break

   elif choice == '<':

       larger = myNumber - 1

   else:

       smaller = myNumber + 1

Explanation:

  • Inside an infinite while loop, add the smaller and larger number and assign that value to myNumber variable.
  • Check the choice and then print the relevant display message.
You might be interested in
Your car's engine, transmission, power steering, and brakes all require __________ inspection and changes.
kvasek [131]

The answer is C


All parts require fluid

4 0
3 years ago
Read 2 more answers
An administrator is troubleshooting an endpoint whose SIP Registration Status shows "Failed: 403 Forbidden" and must obtain info
Katena32 [7]

Answer:

A and C

Explanation:

To obtain information about the case of the error the engineer would navigte thus:

Endpoint > Log Files > messages.log > (c) VCS > Maintenance > Diagnostics > Incident Reporting > View.

Cheers

8 0
3 years ago
Hordes of surreptitiously infiltrated computers, linked and controlled remotely, also known as zombie networks are known as:
icang [17]
~Hello there! ^_^

Your answer: Hordes of surreptitiously infiltrated computers, linked and controlled remotely, also known as zombie networks are known as..?

Your answer: Hordes of surreptitiously infiltrated computers, linked and controlled remotely, also known as zombie networks are known as botnets.

Hope this helps~





3 0
3 years ago
The domain name system ________. Question 2 options: A) is a way to find a host's IP addresses if your computer only knows the h
ra1l [238]

Answer:

C) both a and b

Explanation:

13) The domain name system ________.

A) is a way to find a host's IP addresses if your computer only knows the host's host name

B) is a general naming system for the Internet

C) both A and B

D) neither A nor B

8 0
2 years ago
Care should be taken whenever you post comments or photos to any social media or other websites, because each of these online ac
REY [17]

Answer:

True

Explanation:

Building your personal brand requires extreme care when it comes to social media presence. In the age of internet there is nothing hidden, so whatever you post or comment will be seen by your audience and it can go in either way. It can either make your brand or break it. It is of utmost importance to leave a pleasant and positive impact on your audience. One should not indulge in inappropriate or controversial debates and try to avoid being too personal on social media.  

6 0
3 years ago
Other questions:
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • Kurt is editing a table in his powerpoint that displays accounting formulas and when to use them. he wants to remove the table s
    15·1 answer
  • Which of the following guidelines about forwarding e-mail messages is most appropriate?
    12·2 answers
  • The key invention that enabled computers to go into every home and office is
    7·1 answer
  • Try using the inv command to find the inverse of the matrix Notice the strange output. Include your command and the output in yo
    10·1 answer
  • How to do pseudocode and flowchart in BMI ( computer programming ​
    11·1 answer
  • 1) List at least five smaller behaviors you could break the complex behavior "brushing my teeth" into.
    14·2 answers
  • A business letter is not written:
    6·1 answer
  • Add Try/Catch error checking To make sure that the user enters valid values in your program. To catch negative values passed to
    9·1 answer
  • Write c++ program to find maximum number for three variables using statement ?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!