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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, Lilabbychichi
Ryan is working on the layout of her web page. she needs to figure out where her header, navigation bar, text, and images should go. what technique can her?
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, Molly05
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is 50e0bf08e5b671@ualwgypg91wa5wl. uzo9kbud3qjwddygd5.vng -
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, vane3152
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
image
Computers and Technology, 24.06.2019 00:00, Amrinderkhattra
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
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 in other subjects:

Konu
Mathematics, 04.04.2020 00:31
Konu
Mathematics, 04.04.2020 00:31