This program is a simple language learning flashcards quiz app designed to help users learn Spanish by testing their knowledge of Spanish-to-English translations. Here’s how it works:
Word List:
A list of Spanish words is provided along with their English translations. Each word pair is stored as a dictionary, where the Spanish word is the key, and the English word is the value. Quiz Functionality:
The program randomly shuffles the list of words to ensure each quiz is different. For each word in the shuffled list, the user is asked to translate the Spanish word into English. The user enters their answer, and the program checks if it matches the correct English translation (case-insensitive). If the user’s answer is correct, they receive a congratulatory message and gain a point; otherwise, they are informed of the correct answer. Score Tracking:
The program tracks the user’s score throughout the quiz, counting the number of correct answers. After the quiz is complete, the program displays the user’s score out of the total number of words in the list. Main Function:
The main function welcomes the user, prompts them to press enter to start the quiz, and calls the quiz function to begin. This program provides a fun and interactive way to practice Spanish vocabulary by testing translation skills and providing instant feedback on the user’s performance.