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
: Show that the propositions (p ∨ q) ∧ (¬p ∨ r) and (p ∧ r) ⊕ (¬p ∧ q) are logically equivalent.
Ipatiy [6.2K]

Answer:

(p\vee q)\wedge(\neg p\vee r)\equiv(p\wedge r)\vee(\neg p\wedge q)

Explanation:

The statements are logically equivalent if they have the same truth tables. So let´s use truth tables in order to determine if they are logically equivalent or not:

The picture that I attached you shows the truth table for each case. As you can see in the highlight columns:

(p\vee q)\wedge(\neg p\vee r)\equiv(p\wedge r)\vee(\neg p\wedge q)

They are  logically equivalent because they have exactly the same truth values between each other. Hence, we can conclude that they are logically equivalent.

3 0
3 years ago
Question 15 of 25
GaryK [48]
It gains purchasing power. Less money in circulation = more value.
5 0
3 years ago
During active listening, which response is NOT an example of providing feedback to the speaker to show that you understand his o
MaRussiya [10]

Answer:

The answer is D.

Explanation:

They/you are asking the speaker to clarify what they just said.

6 0
3 years ago
What does it mean to read visual and audio text
solniwko [45]

Talking books could be a means to automatize and generalize such an audio–visual reading experience. ... RWL consists of an experimental reading situation where one reads a text while one can hear it said aloud by a prerecorded speaker or by a text-to-speech system.


5 0
3 years ago
What job title is used for the person who uses the server operating system to add and remove users, install software, and admini
yan [13]
System Administrator
7 0
3 years ago
Other questions:
  • How can i add card reader to pc answers?
    9·1 answer
  • User accounts will be locked out after authentication is attempted
    7·1 answer
  • In your own words, explain the role of scientific investigation in the development of the Theory of Evolution.
    6·1 answer
  • When writing a personal narrative, what point of view would be best to use? (1 point) first person second person third person th
    10·2 answers
  • Give an O(log m + log n)-time algorithm that takes two sorted lists of sizes m and n, respectively, as input and returns the ith
    7·1 answer
  • Effective display designs must provide all the necessary data in the proper sequence to carry out the task. Identify a recent pe
    12·1 answer
  • Interactive sites where users write about personal topic and comment to threaded discussion are called?
    10·2 answers
  • A ____ object is used to hold data that is retrieved from a database via the OleDbDataAdapter connection. a. DataRecord b. DataS
    12·2 answers
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • Which of the following is true about parallel computing performance?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!