TORONTO KIDS COMPUTER CLUB | Saturday 9:30 Python Homework 10.27.
15900

# Saturday 9:30 Python Homework 10.27.

## 30 Oct Saturday 9:30 Python Homework 10.27.

Question 1：

Write a program that does the following:

• Generates a random secret number between 1 and 100 (including 1 and 100).
• Asks the user to guess the secret number, then tell them whether they guessed too low, too high, or exactly right.
• Keeps the game going until user guesses the secret number unless the user types “quit”
• Keeps track of how many guesses the user has taken, and when the game ends, prints this out.
• Make sure you use comments so that you, other students, and the teacher can easily understand your code.

(The student who completes the program correctly with all the requirements above will have their program featured in class when we review the homework !!!)

Execute the Game: test output player chooses to play until guessing secret

Sample output 1:
Welcome to the number guessing game:
> To play, enter a guess between 1 to 100.
> To quit, enter the word ‘quit’.
Your guess is too high. Guess a lower number.
Your guess is too low. Guess a higher number.
Your guess is too high. Guess a lower number.
Your guess is too low. Guess a higher number.
You guessed the secret number!
It takes you 5 tries.