In: Computer Science
Driver’s License Exam 20PTS PYTHON AND FLOWCHART The local driver’s license office has asked you to design a program that grades the written portion of the driver’s license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1.B 6.A 11.B 16.C 2.D 7.B 12.C 17.C 3.A 8.A 13.D 18.B 4.A 9.C 14.A 19.D 5.C 10.D 15.D 20.A Your program should store these correct answers in an array. (Store each question’s correct answer in an element of a String array.) The program should ask the user to enter the student’s answers for each of the 20 questions, which should be stored in another array. After the student’s answers have been entered, the program should display a message indicating whether the student passed or failed the exam.(A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions.
******Need Python code
***** Need pseudocode and flowgorithm flowchart
Thanks for the question. Below is the code you will be needing Let me know if you have any doubts or if you need anything to change. Thank You ! =========================================================================== def displayResult(correct,userAnswers): correctelyAnswered=0 incorrectQuestions=[] for i in range(len(correct)): if correct[i]==userAnswers[i]: correctelyAnswered += 1 else: incorrectQuestions.append(str(i+1)) print('Total number of correctly answered question was {}'.format(correctelyAnswered)) print('Total number of incorrectly answered question was {}'.format(20-correctelyAnswered)) print('Questions with incorrect answers - {}'.format(','.join(incorrectQuestions))) if correctelyAnswered>=15: print('You have passed the exam') else: print('You have failed the exam') def main(): correct_answers = ['B', 'D', 'A', 'A', 'C', 'A', 'B', 'A', 'C', 'D', 'B', 'C', 'D', 'A', 'D', 'C', 'C', 'B', 'D', 'A'] user_answers=[] for i in range(1,21): answer = input('Question {:02}: Enter correct answer (A,B,C or D): '.format(i)).upper() user_answers.append(answer) displayResult(correct_answers,user_answers) main() =========================================================================