Question: Write a function named play game that meets the following requirements: Set up a variable named secret number and use the initialize puzzle function to
Write a function named play game that meets the following
requirements:
Set up a variable named secret number and use the
initialize puzzle function to set its value.
Set up a variable named low to have an initial value of
Set up a variable named high to have an initial value of
Set up a variable named turn to have an initial value of
"Human".
Set up a variable named guess and use the get guess
function to give it an initial value.
While the guess does not match the secret number
Reset the turn variable using the toggle turn func
tion.
Pause the program for dramatic effect
If the guess is too high, then reset the high variable to
have the value guess and print: "Tow high!"
Otherwise, reset the low variable to have the value
guess and print: "Tow low!"
Pause for dramatic effect.
Reset the guess variable using the get guess function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
