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
CODEHS: WHY is it important to know the difference between div and span?
DerKrebs [107]

Span and div are both generic HTML elements that group together related parts of a web page. However, they serve different functions. A div element is used for block-level organization and styling of page elements, whereas a span element is used for inline organization and styling.

3 0
2 years ago
Rewrite this method so that it avoids the use of a return statement:
olganol [36]
Sorry we chose 0 for the denominator
8 0
3 years ago
Which tag pair contains the items in an ordered or unordered list?
Serga [27]
```
<ul>
  <li>item1</li>
  <li>item2</li>
</ul>
```
It's the same for ol.
7 0
3 years ago
Households pay taxes to the government and receive public services. Which of the following is a public service?
Gwar [14]
C. Roads  this is the correct answer
8 0
3 years ago
Four actions that can be implemented on a database to autocorrect violations of referential integrity, and the outcomes of the a
Paraphin [41]

Answer:

Follows are the matching to this question:

Option \ a \to \ Option \ 3\\\\Option \ b \to \ Option \ 4\\\\Option \ c \to \ Option \ 1\\\\Option \ d \to \ Option \ 2\\

Explanation:

While time-consuming or prone to errors mechanical adjustments to both the referential, databases could be configured with four measures to engine violations. The restricted action causes the insert, update, and removes to only be denied. Set Null to NULL sets the invalid external key, whereas Set Default to a specific core consideration specified in SQL sets a default foreign key. Its Cascade operation spreads the main changes in external keys.

6 0
3 years ago
Other questions:
  • Ryan is looking at investment opportunities as a cloud service provider. He wants to invest in a deployment-based cloud model th
    11·2 answers
  • Describe how one device can send a bit to another device.
    9·1 answer
  • ___ is a career discipline focusing on helping companies use computer technology effectively.
    12·1 answer
  • Which is said to be ‘computer on a chip’
    8·1 answer
  • Describe the best way to deal with a difficult co-worker?
    13·2 answers
  • The labels on the tab buttons on the Driver tab of the Windows Device are Driver Details, Update Driver, Roll Back Driver, Unins
    12·1 answer
  • Write a routine to interchange the mth and nth elements of a singly-linked list. You may assume that the ranks m and n are passe
    10·1 answer
  • What is the definition of the word uproot?
    15·1 answer
  • What are the different Stape of data processing cycle?​
    8·1 answer
  • What are the different types of monitors?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!