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
Many networks are set up using a hierarchical architecture to create a "backbone" network. In this system, several connected rou
34kurt

Answer:

Explanation:

For example with the hierarchical network design of Cisco (three-layer) it is worth mentioning the following benefits:

- This type of infrastructure is highly reliable

- The complex problem regarding network design is broken into smaller and manageable areas.

- Improved access, access, core layers and distribution

-  The hierarchy provides specific functions important in defining its role within the whole network.

Regarding the access layers in the hierarchy the following are core benefits:

- Layer 2 switching

- Virtual access control lists (VACLs)

- Power over Ethernet (PoE) and auxiliary VLANs for VoIP

- Spanning tree

- High availability

- Port security

- Address Resolution Protocol (ARP) inspection

5 0
4 years ago
Select the correct answer.
goblinko [34]

Answer:

b

Explanation:

8 0
3 years ago
PLEASE HELP ME
alexira [117]

Answer:

it won't be able to run

Explanation:

because computer runs on physical memory

5 0
2 years ago
What is the name of the place where students access all of their course information? Student handbook. Learning management syste
ehidna [41]
The syllabus is where students can find their course information.
3 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
baherus [9]

At the two opposite direction or angle should he take the photo and Henry should shoot at an angle of 180 degrees.

<h3>What is two point lighting photography?</h3>

The two point light principle is known to be one that is itself along with the subject as they are lit from two different directions with the light sources and are said to be 180 degrees apart.

Therefore,  At the two opposite direction or angle should he take the photo and Henry should shoot at an angle of 180 degrees.

Learn more about photograph from

brainly.com/question/25821700

#SPJ1

5 0
2 years ago
Other questions:
  • Windows installer cannot install .exe files. to distribute a software package that installs with an .exe file, what must you do
    14·1 answer
  • Cecelia would like to write an app to help manage a trip to the grocery store. The app will maintain a shopping list (a list of
    7·1 answer
  • Question 14 (3 points)
    5·1 answer
  • The autocorrect feature can automatically capitalize the first letter in the names of days. true false
    15·1 answer
  • Some in the security community argue that a lack of diversity is security vulnerability. For example, Firefox and Internet Explo
    6·1 answer
  • Select the tasks that would be performed by an information systems graduate.
    9·1 answer
  • The person that includes the most and funniest memes (screenshot from the web) gets brainliest.
    5·1 answer
  • Edhesive 7.2 code practice Write a function named ilovepython that prints out I love Python three times. Then, call that functio
    13·1 answer
  • It is not really important to organize your photos because you know that they are on your computer. (TRUE/FALSE)
    10·2 answers
  • if you dont' have access to nessus, which of the following can be used by an attacker to gain information about remote *nix host
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!