Computers and Technology

# 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?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 25.06.2019 04:10, danny123421
8. create an abstract student class for parker university. the class contains fields for student id number, last name, and annual tuition. include a constructor that requires parameters for the id number and name. include get and set methods for each field; the settuition() method is abstract. create three student subclasses named undergraduatestudent, graduatestudent, and studentatlarge, each with a unique settuition() method. tuition for an undergraduatestudent is $4,000 per semester, tuition for a graduatestudent is $6,000 per semester, and tuition for a studentatlarge is $2,000 per semester. write an application that creates an array of at least six objects to demonstrate how the methods work for objects for each student type. save the files as student. java, undergraduatestudent. java, graduatestudent. java, studentatlarge. java, and studentdemo. java.
Answers: 1
image
Computers and Technology, 25.06.2019 05:30, 19jcormier
You are asked to calculate an object's velocity, in order to do so you must know the object's a. direction and speed. b. distance and time. c. speed and distance. d. direction and distance.
Answers: 1
image
Computers and Technology, 25.06.2019 06:20, jorgefrom584
Horseback riders, bicyclists, and skateboarders the rules of right-of-way when they use the road ?
Answers: 1
image
Computers and Technology, 25.06.2019 08:20, chloesmolinski0909
In the following table, column a is column b is and column c is
Answers: 1
Do you know the correct 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: