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
Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
Vinil7 [7]

Answer:

Clara should use computer lenses and artifical tears.

The computer lenses help block blue light from entering your eyes which would help with the headaches and help you focus on something further away. The artificial tears help lubricate dry eyes which prevents or in Clara's case, reduces/relieves eye strain.

8 0
2 years ago
What are copyright laws? Authority to reprint an original work as long as it's not for profit Entitlement to use and sell anothe
Anastaziya [24]
I think it's the lest one: Rights given to original authors and creators to protect their work from unlawful use
5 0
3 years ago
Read 2 more answers
What is the difference between posting and transfer in ICT please I need the answer before TMR​
Radda [10]

Answer: b

Explanation: trust

7 0
2 years ago
Hot components or sharp edges of computer is an example of what hazard​
Alexxandr [17]

Answer:

hot components or sharp edges of computer is an example of a mechanical hazard

6 0
3 years ago
How much cell phone data does the average person use a month
azamat
It all depends on what you're doing online.
7 0
3 years ago
Other questions:
  • A publisher has a text-only leader board on top of a page, and a text-only small square ad slot within the content of that page.
    7·1 answer
  • The jailbreak property that, if the user turns the device off and back on, the device will start up completely, and the kernel w
    15·1 answer
  • What does the clone tile command do?
    15·2 answers
  • There are two main advantages to using multiple threads in a process: 1) Less work involved in creating a new thread rather than
    7·1 answer
  • Explain what is meant by information technology (IT). Explain what is meant by information systems (IS). Why is it important to
    7·1 answer
  • Explain how to utilize the computer in rooms management.​
    13·1 answer
  • Who play fortnite gameeeeeeee
    14·1 answer
  • What are the steps to customize a slide show?
    10·2 answers
  • Please help this is a coding assignment I need help! (use python)
    12·1 answer
  • Guys, please help me asap (Photo Attached) !!!!!!! HELP 25pts!!!!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!