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
Inessa05 [86]
3 years ago
12

Must be python format

Computers and Technology
1 answer:
Irina18 [472]3 years ago
7 0

import random

to_guess = random.randint(1, 1000)

count = 0

guess = 0

while guess != to_guess:

   guess = int(input("Guess a number between 1 and 1000? "))

   while guess < 1 or guess > 1000:

       guess = int(input("Whoops, guess a number between 1 and 1000? "))

   count += 1

   if guess > to_guess:

       print("Your guess is too high! Try a lower number.")

   elif guess < to_guess:

       print("Your guess is too low!. Try a higher number.")

print("You got it! The number is " + str(to_guess)+" and you got it in " + str(count) + " guesses!")

I hope this helps!

You might be interested in
What was the name of the first personal computer and what year was it introduced
Nadya [2.5K]

Answer:

IBM's own Personal Computer (IBM 5150) was introduced in August 1981, only a year after corporate executives gave the go-ahead to Bill Lowe, the lab director in the company's Boca Raton, Fla., facilities. He set up a task force that developed the proposal for the first IBM PC.

6 0
3 years ago
Rupa would like to quickly insert a table into her document without having to worry about formatting the data in the table. Whic
USPshnik [31]
Internet tap and log on application
6 0
3 years ago
Read 2 more answers
Which of the following is considered true regarding the future of technology?
netineya [11]
Hello!

The answer is:
-It is evolving quickly and always changing.

I hope that this helps you!
5 0
3 years ago
Which of the following would be the most appropriate way to address and greet your teacher, Mr. Joseph Herman, in an email? Hi J
Valentin [98]
To determine what would be the most appropriate way to address and greet your teacher during an email, we should eliminate some greetings, such as:
"Yo wassup?", "How  u doin?", or any other grammatical and socially inappropriate errors.
Let's look at our first option.
"Hi Joseph, How u doin??". This is incorrect as it is not appropriate to address anyone in such a manner and with grammatical errors.
Let's look at our second option.
"Dear Joseph Herman, how are you doing!!". This was on the right path, but didn't end well. The ending of the message, "how are you doing!!" is incorrect punctuation, and has too much excitement.
How about our third option?
"Dear Mr. Herman, I hope you're doing fine.". This is a great email. It has perfect punctuation, grammar, and is appropriate.
What about our fourth?
"Dear Joseph, i hope you are doing great.". This is a good email, but has incorrect punctuation.
Your answer is C.) Dear Mr. Herman, I hope you're doing fine.
8 0
3 years ago
How is a microprocessor different from an integrated circuit?
pychu [463]

Answer:

Explanation:

Microprocessors are faster, smaller and less expensive than integrated circuits. ... Microprocessors control the flow of electrons and integrated circuits control the flow of protons.

6 0
3 years ago
Other questions:
  • _____ performs a real-time lookup of a digital certificate’s status. Group of answer choices Certificate Revocation List (CRL) R
    6·1 answer
  • The blank areas around the outside edges of a document are called the _____. a. settings b. margins c. blank space d. empty spac
    14·1 answer
  • A network administrator was testing an IPS device by releasing multiple packets into the network. The administrator examined the
    13·2 answers
  • When do you use FTP?
    10·2 answers
  • Click/press _______ to remove the most recently typed text.
    12·2 answers
  • Design by contract considers the software system to be a setof:
    10·1 answer
  • Why were low quality video so often use when Internet connection we’re poorer than they are today
    12·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
    7·1 answer
  • What type of loop allows you to indicate the starting value for the loop control variable, the test condition that controls loop
    14·1 answer
  • Why is it necessary to have a w-2 or 1099 form when using tax preparation software?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!