Question: Use a while statement to create a loop that allows the user to play multiple rounds of guessing the year game. Implement a scoring system:

Use a while statement to create a loop that allows the user to play multiple rounds of guessing the year game.
Implement a scoring system:
Award 3 points for correct guesses on the first attempt.
Award 2 points for correct guesses on the second attempt.
Award 1 point for correct guesses on the third attempt, else no points awarded.
After each round, prompt the user to confirm if they want to continue playing.
Keep track of the total score across all rounds.
When the user decides to stop, display their final score and a rank based on their performance:
0-5 points: "S.H.I.E.L.D. Recruit"
6-10 points: "Avenger in Training"
11-15 points: "Earth's Mightiest Hero"
16+ points: "Guardian of the MCU Timeline"
Name your file mcu4.pySample output
Enter filename: movies1.txt
WELCOME TO THE SHIELD DATABASE >
Iron Man 28 es
Thor 2011
Captain Anerica: The First Avenger 2011
Doctor Strange 2016
Spider-Man: Honeconing 2817
Black Panther 2018
Captain Anerica: The Winter Soldier 2014
The Avengers 2012
Spider-Man: No Way Hone 2621
Enter a number between 1-9: 5
The novie is Spider-Man: Horecoming
Guess the release year: 2817
Correct! Well done, Agent!
Attempt 1
Guess the release year: 2009
Attempt 2
Your guess is lower
Guess the release year: 2011
Correct! Well done, Agent!
Your current score is 5
Do you want to continue (yn):y
Enter a movie: Iron Man
Attempt 1
Guess the release year: 2021
Attempt 2
Your guess is higher
Guess the release year: 2010
Attempt 3
Hint: 200*
Guess the release year: 2008
Correct! Well done, Agent!
Your current score is 6
Do you want to continue (yn):n
Game Over! Your final score is 6
Your rank is Avenger in Training
Use a while statement to create a loop that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!