Question: The program . Chooses a random palindrome from a list . Presents the user with the first n letters of the palindrome . The user

The program . Chooses a random palindrome from a The program . Chooses a random palindrome from a list . Presents the user with the first n letters of the palindrome . The user . Attempts to guess the palindrome . The program o If the user answers correctly, award a point . If the user answers incorrectly, subtract a point Fetch another random palindrome and present it to the user Continue until the user quits (OLE Shell 3.11.2 Python 3.11.2 (v3.11.2:878eadlacl, Feb 7 2023, 10:02:41) [Clang 13.6.6 (clang-13 ee.e.29.30)] on darwin Type "help", "copyright", "credits" or "license()" for more information. RESTART: /Users/andrewpotter/Documents/IDLE/palingame. py mmm what is the palindrome: STET: STETETS the panlindrome was STETS Your score is now -1 What is the palindrome: SUSU: SUSUS YOU WIN! SUSUS is correct! Your score is now e what is the palindrome: DERE: DERED YOU WIN! DERED is correct! Your score is now 1 4 what is the palindrome: DENN: DENNED YOU WIN! DENNED is correct! Your score is now 2 What is the palindrome: DEKE: DEKED YOU WIN! DEKED is correct! Your score is now 3 What is the palindrome: SEME: SEMES Nope, sorry, the panlindrome was SEMEMES Your score is now 2 What is the palindrome: SUSU: OK, goodbye Download this file: palindromes.txt , Your program will 1. Read the file palindromes file 2. Strip the newline character from each palindrome. (Copy each palindrome into a list as you do so.) 3. Initialize the user's score to zero 4. Create an endless loop that performs the following: A. select random palindrome from the list B. print the first four characters from the list C. prompt the user to guess the palindrome. The user enters a string. You will want to change whatever the user enters to uppercase, since the palindromes from the file are all upper case. D. if the user guesses correctly, increment the score by one point, else if the user guess incorrectly, decrement the score by one point E. continue the loop until the user responds to the input prompt with an empty string (that is, the user hits the return key without making a guess) F. tell the user goodbye, and end the program

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