kyu_8.check_the_exam package¶
Submodules¶
kyu_8.check_the_exam.check_exam module¶
-
kyu_8.check_the_exam.check_exam.
char_processor
(char: str, results: list) → None[source]¶ Processing chars based on specified rule :param char: :param results: :return:
-
kyu_8.check_the_exam.check_exam.
check_exam
(arr1, arr2)[source]¶ The first input array contains the correct answers to an exam, like [“a”, “a”, “b”, “d”]. The second one is “answers” array and contains student’s answers.
The two arrays are not empty and are the same length. Return the score for this array of answers, giving +4 for each correct answer, -1 for each incorrect answer, and +0 for each blank answer(empty string).
If the score < 0, return 0. :param arr1: :param arr2: :return: