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]
3 years ago
5

PYTHON

Computers and Technology
1 answer:
Korvikt [17]3 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
How is a cell named?
bixtya [17]
Im guessing a cell is named by the scientist that found that cell in the fist place.
8 0
3 years ago
What kind of energy transformation occurs when you call someone on a cell phone?
andrew11 [14]

The <em><u>sound energy into electric energy and then into radiant energy.</u></em>

<em>[That's it]:)</em>

5 0
2 years ago
The factors of power of device
LUCKY_DIMON [66]

Answer:

tfopod

Explanation:

5 0
2 years ago
What is the difference between First Person Shooters and Construction Simulations?
Marianna [84]

Answer:No clue

Explanation:

5 0
3 years ago
Read 2 more answers
What is a defult? pls help if you wouldn't mind
Sunny_sXe [5.5K]

Answer:

a beginner or a novice

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • What type of document would you use the landscape page orientation
    7·1 answer
  • Which column and row references are updated when you copy the formula: =F$5+12? Value 12 Column F Column F and row 5 Row 5
    8·1 answer
  • When should an individual consider entering parenthood?
    5·1 answer
  • Look at the following form. Which input method is the form using to receive the user's favorite activity? What is your favorite
    12·2 answers
  • True / False<br> 1. A byte is a standardized unit of measure that is always 8-bits.
    7·1 answer
  • If you will be giving your presentation to an audience, you can practice your presentation by using View, ___________, to rehear
    14·1 answer
  • Around what time did the Internet come around and how did it all start? Would like to know more of the history of how the intern
    12·1 answer
  • Which of the following should you do if your accelerator is stuck? A. Pump your brakes to build fluid pressure. B. Shift to Neut
    14·2 answers
  • A friend wants to design an app but has never done so before and isn't sure how to begin. What would you suggest they do first?
    7·1 answer
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!