Computers and Technology, 11.10.2021 14:00 dubouuu
PLEASE HELP BRAINLIEST EASY FOR PEOPLE WHO CODE WILL GIVE BRAINLIEST PLEASE I AM STUCK NEED HELP
Part 1: Review the Code
Review the code and locate the comments with missing lines (# Fill in missing code).
On the surface this program seems simple. Allow the player to keep guessing until he/she finds the secret number. But stop and think for a moment. You need a loop to keep running until the player gets the right answer.
Some things to think about as you write your loop:
• The loop will only run if the comparison is true.
(e. g., 1 < 0 would not run as it is false but 5 != 10 would run as it is true)
• What variables will you need to compare?
• What comparison operator will you need to use?
# 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()
Output
Your guessed 10. Too high.
Your guessed 1. Too low.
Your guessed 3. Too low.
Good job, Jax! You guessed my number (5) in 3 tries!
Answers: 3
Computers and Technology, 21.06.2019 17:00
Which process would best represent the opposite of exhausting air from a system?
Answers: 2
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
PLEASE HELP BRAINLIEST EASY FOR PEOPLE WHO CODE WILL GIVE BRAINLIEST PLEASE I AM STUCK NEED HELP
P...
Health, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Chemistry, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Biology, 08.01.2021 14:00
Biology, 08.01.2021 14:00
English, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Mathematics, 08.01.2021 14:00
Chemistry, 08.01.2021 14:00