Question: Write a program called whilebun.py, in which the user is asked to guess the name of your favorite DBVac vacuum cleaner model. Your program


Write a program called whilebun.py, in which the user is asked to guess the name of your favorite DBVac vacuum cleaner model. Your program should: Include a comment in the first line with your name. Include comments describing each major section of code. Set a variable called favvac to be equal to the name of your favorite DBVac vacuum cleaner model (i.e., Bunny King, etc.). Ask the user to guess the name. Allow the user to make up to three guesses, evaluating each guess for correctness immediately after the guess is made. o The user's guess shouldn't be required to be case sensitive to be correct. For instance, if your favorite model is the Hare Razer, but the user inputs "HARE RAZER", then that should be counted correct (as should "hare razer", "hArE rAzEr" and any other combination of capital and lower-case letters). o If the user guesses wrong, let them know, tell them how many guesses they have left, and have them guess again (up to three guesses total). If the user is down to their last guess, give them a hint by telling them what the first letter of the vacuum cleaner model is. To do this, use the variable (favvac) and an index value. If the user guesses the correct name: o o o Stop asking the user to guess (even if they have not yet guessed three times). Congratulate the user on their guessing skills. Tell the user how many guesses it took them to guess correctly. If the user runs out of guesses without guessing the correct name: Console the user by telling them that, while they have failed in this task, it's going to be okay.
Step by Step Solution
3.42 Rating (165 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
