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
LenKa [72]
3 years ago
11

# Initialize variables

Computers and Technology
1 answer:
Ne4ueva [31]3 years ago
5 0

numGuesses = 0

userGuess = -1

secretNum = 5

name = input("Hello! What is your name?")

while userGuess != secretNum:

   userGuess = int(input("Guess a number between 1 and 20: "))

   numGuesses = numGuesses + 1

   if (userGuess < secretNum):

       print("You guessed " + str(userGuess) + ". Too low.")

   if (userGuess > secretNum):

       print("You guessed " + str(userGuess) + ". Too high.")

   if(userGuess == secretNum):

       print("You guessed " + str(secretNum)+ ". Corret! "+"It took you " + str(numGuesses)+ " guesses.")

You might be interested in
How ssd is better than normal sata and pata HDD​
BartSMP [9]

The HDD offers high storage capacities at a low price, while the SSD provides blazing fast access speeds at a higher cost.
3 0
3 years ago
Technologies designed to replace operating systems and services when they fail are called what?
Pie

Answer:

Bare metal recovery.

Explanation:

Technologies designed to replace operating systems and services when they fail are called bare metal recovery.

Basically, it is a software application or program which is primarily designed to enable users to reboot the affected system and services that have failed, usually from a removable media, CD-Rom using an image file of the operating system backup.

4 0
4 years ago
Match each sentence to the type of imperialism it describes.
tankabanditka [31]

There is nothing to match?

5 0
3 years ago
Out put of Print (3**2*2)
expeople1 [14]

Answer:

18

Explanation:

please mark me as brainliest

4 0
2 years ago
Read 2 more answers
Processors for most mobile devices run at a slower speed than a processor in a desktop PC.
kramer

Answer:

True....................

5 0
3 years ago
Read 2 more answers
Other questions:
  • What tab must you click on to view any previously read messages from instructors in the message center?
    14·2 answers
  • What is an additional clock tab
    11·1 answer
  • You would like to search for information about storms but not tornadoes. What type of search strategy may be useful?
    10·2 answers
  • How to get the home button on your screen?
    13·1 answer
  • dam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correct
    9·1 answer
  • 2. Who created the first photograph? How was this done?
    14·2 answers
  • An organization's Finance Director is convinced special malware is responsible for targeting and infecting the finance departmen
    13·1 answer
  • A university with remote campuses, which all use different service providers, loses Internet connectivity across all locations.
    12·1 answer
  • You are a teaching assistant for an introductory computer concepts course at your local community college. The instructor asks y
    11·1 answer
  • Which era marked a switch from agricultural practices to industrial practices?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!