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
You work on the marketing team for a software company. You do not work closely with the development team; however, you need to k
topjm [15]

Answer:

b. an e-mail

Explanation:

Based on the scenario being described within the question it can be said that the best electronic communication tool in this scenario would be an e-mail. Using e-mails you would be able to send detailed communication messages to all of the individuals that need to read that message in one e-mail. Thus allowing for fast and clear communication between all relevant parties. Both podcasts and Wiki's are used for providing information to clients, or the target audience but not for sharing info within the company.

4 0
3 years ago
1. Describe how research and development influence design. Cite specific examples of how research and development influence desi
vladimir1956 [14]

Answer:

so i research and found this,

Development is when findings of a research are utilized for the production of specific products including materials, systems and methods. Design and development of prototypes and processes are also part of this area. Engineering is utilization of these plans and research to produce commercial products.

4 0
3 years ago
Which of the following items are typically included in a balanced budget A. The amount you earn in income
taurus [48]
D is the correct answer

8 0
3 years ago
PLEASE HELP ME! Will report ignorant answers!
kaheart [24]

Answer:

It is important so your computer can function properly. the two things that might happen if they are not compatible are that it might crash your computer and that your computer might not function properly.

5 0
2 years ago
Abby wants to simply share a snapshot of her calendar with another user. Which option should she choose to achieve this
Papessa [141]

Answer:

Screenshot

Explanation:

Just a guess

8 0
3 years ago
Read 2 more answers
Other questions:
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • Write a method that checks whether the input string or a sentence (a string with spaces) is a palindrome or not. The method shou
    13·1 answer
  • Write a code segment that takes an emailaddress stored in the string email and stores theuser name in the string user and the ho
    13·1 answer
  • The Internet may best be compared to a/an
    8·1 answer
  • Write 3 functions in the starter code below such that: add_to_dict(): takes a dictionary, a key, a value and adds the key,value
    15·1 answer
  • Which of the following can spreadsheet programs help a person with? (choose all that apply.)
    9·1 answer
  • Discuss the impact printer and its types in detail?
    7·1 answer
  • define a computer, state its 3 main activities with examples of the functions of each of those activities​
    7·1 answer
  • Which is an example of an operating system? (5 points)
    5·1 answer
  • Question 3 of 10<br> What was the fly in the ointment of Timmy's friendship with Rollo?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!