subject

Coding: FLVS, What is the problem with the code # Heading (name, date, and short description) feel free to use multiple lines

def main():

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

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

# Fill in the missing LOOP here.
# This loop will need run until the player has guessed the secret number.

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.")

# 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()

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 18:20
Use a while-end loop in a script file to calculate the sum of the first n terms of the series: summation sign on the top n bottom k=1 : )^k * k^2 +5k)/3^k show the script file and the two results of n = 10 and n = 20.
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
How does a vaccine prevent sickness and individual?
Answers: 2
question
Computers and Technology, 25.06.2019 07:30
The can be used to paste text in any order.
Answers: 1
question
Computers and Technology, 25.06.2019 13:00
What are the different components of the cloud architecture?
Answers: 1
You know the right answer?
Coding: FLVS, What is the problem with the code # Heading (name, date, and short description) feel...
Questions
question
Chemistry, 09.11.2019 23:31
question
Mathematics, 09.11.2019 23:31
question
Mathematics, 09.11.2019 23:31
question
Business, 09.11.2019 23:31
Questions on the website: 13722361