subject

# Ben Rouse, Today's date is the 11th of March, 2021. This is a great way to finally be able to guess correctly because you get multiple attempts to guess my number. def main():

# Initialize variables
numGuesses = 0
userGuess = -1
secretNum = 5

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

# Sorry, that nummber is incorrect.
# This loop will need run until the player has guessed the secret number.

numGuesses = (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.")

# Fill in missing PRINT statement here.
# Print a single message telling the player:
# That he/she guessed the secret number
# What the secret number was
# How many guesses it took

main()

What am I doing wrong here?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Active listen eliminates barries to communication true or false
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
You know the right answer?
# Ben Rouse, Today's date is the 11th of March, 2021. This is a great way to finally be able to gues...
Questions
question
Geography, 19.02.2021 02:50
question
Mathematics, 19.02.2021 02:50
question
Mathematics, 19.02.2021 02:50
question
Advanced Placement (AP), 19.02.2021 02:50
Questions on the website: 13722363