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
Hi<br>is it right?<br>"I think there is a small mistake in the quotation(second not first)"​
Molodets [167]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

  The correct option to this question is:

.clr{color:blue;}

I write the complete code of HTML using this CSS style to execute this scenario as given below

<html>

<head>

<style>

.clr

{

color:blue;

}

</style>

</head>

<body>

<a href="pg.html" class="clr">click here</a>

<h2 class="clr">Home</h2>

</body>

</html>

The bold text is a complete code of this question.  When you will run it it will execute a link and Home text on the page in blue color. So the correct option is .clr{color:blue;}

7 0
3 years ago
python Write a class named Taxicab that has three **private** data members: one that holds the current x-coordinate, one that ho
Blizzard [7]

Answer:

see explaination

Explanation:

class Taxicab():

def __init__(self, x, y):

self.x_coordinate = x

self.y_coordinate = y

self.odometer = 0

def get_x_coord(self):

return self.x_coordinate

def get_y_coord(self):

return self.y_coordinate

def get_odometer(self):

return self.odometer

def move_x(self, distance):

self.x_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

def move_y(self, distance):

self.y_coordinate += distance

# add the absolute distance to odometer

self.odometer += abs(distance)

cab = Taxicab(5,-8)

cab.move_x(3)

cab.move_y(-4)

cab.move_x(-1)

print(cab.odometer) # will print 8 3+4+1 = 8

5 0
4 years ago
1-5. Discuss briefly the function and benefits of computer network. (5pts​
Elden [556K]

Computer networks allow an unlimited amount of computers to communicate with each other. This is especially useful in enterprise environments, as technicians have to deal with hundreds of computers at a time. Computer networks make it easier to share files, increase storage capacity, better communication, easier to to control computers remotely, easier to share resources, ability to share a single internet connection on multiple devices. Computer networks also have a lot of cost benifits too, as network administration is centralised, meaning that less IT support is required, and you can cut costs on sharing peripherals and internet access.

Hopefully this helps you out!

7 0
3 years ago
Help!!!
Butoxors [25]

Answer:

ummmm try the inequality protragathron theorum

Explanation:

ok

3 0
3 years ago
What kind of personal information are you comfortable sharing with others online? Why? What steps do you take to control how tha
GaryK [48]

Answer:

this is more of an opinion question regarding what you personally do

8 0
3 years ago
Read 2 more answers
Other questions:
  • An LPN/LVN has transferred to a nursing unit and arrives for the first day. The RN checks with the LPN/LVN often throughout the
    11·1 answer
  • In a pinhole camera, the image seen in the camera will be inverted<br><br> true<br> false
    13·2 answers
  • Many loop control variable values are altered by ____ or adding to them
    11·1 answer
  • you are configuring a firewall to all access to a server hosted in the demilitarized zone of your network. You open IP ports 80,
    7·1 answer
  • Convert (675.6)8 to hexadecimal. (use base 2 instead of base 10 as the intermediate base for conversion).
    15·1 answer
  • Write function that ask for input from a user. Use this input as input for the countdown function that we wrote using the while
    6·1 answer
  • 15. Cinematic tutorials and action-movie camera shots mixed with gameplay and some of the features that have made _____ stand th
    11·1 answer
  • Which is the smallest form of data <br>a)bit <br>b)byte<br>c)nibble<br>d)8 binary digits<br>​
    10·1 answer
  • Make a jingle about basic of photo editing<br>pls answer me asap​
    10·1 answer
  • Which option in PowerPoint allows users to configure the number of columns and rows manually, using numerical values?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!