Check Typing Accuracy

Exercise to check typing accuracy by comparing user-generated word lists against correct versions using Python.

This function `check_typing_accuracy` compares two lists - `user_input` and `correct_text`. The `user_input` list contains words typed by a user and `correct_text` contains the correct versions of these words. The function's purpose is to determine the typing accuracy of the user by comparing the two lists and returning a list, where `1` represents correct words and `-1` represents incorrect words, in the same order as the typed words. ### Parameters - `user_input` (List[str]): A list of strings representing the words typed by the user. - `correct_text` (List[str]): A list of strings representing the correct versions of these words. ### Return value - This function returns a list (List[int]) that represents the typing accuracy of the user. A `1` indicates a correctly typed word, while `-1` indicates an incorrectly typed word. ### Examples ```python # Here, "find" should be "fine". check_typing_accuracy(["it", "is", "find"], ["it", "is", "fine"]) # Outputs: [1, 1, -1] # Here, "showrs" should be "showers" check_typing_accuracy(["april", "showrs", "bring", "may", "flowers"],["april", "showers", "bring", "may", "flowers"]) # Outputs: [1, -1, 1, 1, 1] ```