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
MA_775_DIABLO [31]
2 years ago
5

PYTHON

Computers and Technology
1 answer:
Korvikt [17]2 years ago
6 0

Answer:

import random

print("Hello! I have a random number from 1 to 100! It is your job to try and guess it!")

number = random.randint(1,101)

guess = int(input("start to guess: "))

num_guesses = 1

while guess != number:

   if guess > number:

       print("lower")

       guess = int(input("try again: "))

       num_guesses +=1

   elif guess < number:

       print ("higher")

       guess = int(input("start to guess: "))

       num_guesses +=1

print("congrats it took you", num_guesses, "tries")

Explanation:

You might be interested in
In the excerpt above, what can be inferred by the statement, “The Dillingham had been flung to the breeze during a former period
galina1969 [7]
The best and the most correct answer among the choices provided by the question is the first choice. We can infer from the excerpt that <span>Jim felt important enough to place his full name on the mailbox when he enjoyed a higher income. </span>I hope my answer has come to your help. God bless and have a nice day ahead!
3 0
3 years ago
Read 2 more answers
What is the main reason to create flash cards?
ryzh [129]

the main reason it to create flash card is the first one

5 0
3 years ago
Read 2 more answers
. What is piracy? ???????????????????​
Delicious77 [7]

Answer: a practice similar to piracy but in other contexts, especially hijacking.

"air piracy"

the unauthorized use or reproduction of another's work.

Explanation:

8 0
3 years ago
Which of the following lists the stages of the four-stroke engine cycle in the correct order of operation?
kvasek [131]
The answer is (a) Intake, Compression, Power, Exhaust.
The fourth-stroke engine cycle or the commonly known as the four cycle is a type of engine that completes four separate strokes while turning a crankshaft. First is the Intake where the piston begins at TDC. Second is the compression where it begins at BDC and the piston compresses the air-fuel mixture for ignition. Third is combustion where the second revolution of the cycle starts. Last is the exhaust where the piston once again returns to TDC from BDC.
6 0
3 years ago
What do you think is the most fascinating aspect of the internet
kari74 [83]
The 20th century seemed to be the year of a complete freedom once the Internet has been spread worldwidely. Unfortunately, it only seemed to be a trial to see various reactions. The 21st century will change this gradually.
6 0
3 years ago
Other questions:
  • Ian is working as a sales manager. He has to generate sales reports using mathematical data that his team has collected. Which c
    15·1 answer
  • Write a program that defines an interface having the following methods: addition, subtraction, multiplication, and division. Cre
    8·1 answer
  • Which of the following is a preferable method to secure wireless access in a SOHO?
    12·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • Multiple Intelligence Theory explains that...
    8·2 answers
  • I need to change the subject before they get onto me. I am only revealing info today if you are a friend.
    5·1 answer
  • How do you change your name on brainly after you have made an account​
    5·1 answer
  • How do you create multiple columns in Word?
    9·1 answer
  • Discuss, in detail, the usefulness of graphics and images in program development. Explain the importance of the interface of a c
    7·1 answer
  • Write the syntax of FOR......NEXT loop​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!