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]
2 years ago
11

# Initialize variables

Computers and Technology
1 answer:
Ne4ueva [31]2 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 do you answer questions
Vera_Pavlovna [14]

Answer:

like this

Explanation:

<h3>you click answer and then<u><em> boom</em></u></h3>
7 0
3 years ago
What is going to be the shortest, most concise restatement of information?
iVinArrow [24]
Not sure i need this too
4 0
2 years ago
Read 2 more answers
A Uniform Resource Locator (URL) consists of three separate parts: network protocol, host, and web browser.
FrozenT [24]
That is false. are you doing it on a computer course.                                             <span />
3 0
3 years ago
Read 2 more answers
A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to c
Sveta_85 [38]

Answer:

The correct answer is

Working with technology companies to offer computing devices at discounted prices to individuals with reduced incomes

Explanation:

As per the question, state government is trying to reduce the digital divide which primarily exists because low income people do not have access to the digital devices. Hence, any step taken to help the low income people to get the digital device will be the best strategy of government to reduce the digital divide.

Thus, the correct answer is Working with technology companies to offer computing devices at discounted prices to individuals with reduced incomes

7 0
3 years ago
What is the input for air cooler computer science​
Maru [420]

Answer:

cooling

Explanation:

Air cooling is a process of lowering air temperature by dissipating heat. It provides increased air flow and reduced temperatures with the use of cooling fins, fans or finned coils that move the heat out of a casing such as a computer …

5 0
2 years ago
Other questions:
  • How do computers find servers, requests information from the server, and receives it?
    12·1 answer
  • False when you tap or click the ‘decrease font size’ button, excel assigns the next lowest font size in the font size gallery to
    13·1 answer
  • A powerpoint ________ is a set of unified design elements.
    5·1 answer
  • To move up one paragraph, press the ____ key(s). f1 alt up arrow up arrow ctrl up arrow
    8·1 answer
  • Oracion con punto focal​
    6·1 answer
  • What function would you use to find the mean in a Microsoft excel document ?
    6·2 answers
  • Count positive and negative number and compute the average. The program will have the user input an unspecified number of intege
    6·1 answer
  • Mention two strategies of collecting data​
    13·1 answer
  • PLEASE HELP How have phones made us spoiled? How have phones made us unhappy?
    10·1 answer
  • You’re investigating an internal policy violation when you find an e-mail about a serious assault for which a police report need
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!