[solved]-Write Python Program Driver S License Exam Local Driver S License Office Asked Design Prog Q39079826
Write A ********PYTHON PROGRAM************
Driver’s License Exam The local driver’s license office hasasked you to design a program that grades the written portion ofthe driver’s license exam. The exam has 20 multiple choicequestions. Here are the correct answers: B D A A C A B A C D B C DA D C C B D A Your program should store these correct answers in anarray. (Store each question’s correct answer in an element of aString array.) The program should ask the user to enter thestudent’s answers for each of the 20 questions, which should bestored in another array. After the student’s answers have beenentered, the program should display a message indicating whetherthe student passed or failed the exam. (A student must correctlyanswer 15 of the 20 questions to pass the exam.) It should thendisplay the total number of correctly answered questions, the totalnumber of incorrectly answered questions, and a list showing thequestion numbers of the incorrectly answered questions. AdditionalRequirements The user’s entries will be case insensitive. Alowercase a will be treated the same as a capital A. (Note: turnthe users answer into the uppercase version of their answer). Whendisplaying the wrong answers, all answers should be displayed ascapital letters (see screenshot). You program should not crash ifthe user does not enter an answer (hits the enter key). Besidesthis your program does not need to be defensive. For example, ifthe user enters a Z or a multi-character answer you do not need totell the user that they entered a nonsense answer. Treat this as awrong answer. The wrong answers must be displayed in achart like the screenshot. Note that the valuesare displayed centered on there heading (as close as possible). Allanswers should be capitalized. You will have 20 assignmentstatements to initialize the correct answer array. Normally wewould not hard code the answers into the program like this, but atthis point that’s all we know how to do. You can use a singlecomment to cover all 20 lines. Your program must use one or moreloops for prompting the user for answers and check their answers.You may not copy, paste, and tweak twenty times for this. Notes Youwill need two parallel arrays for this assignment. You may use athird array if you want. Your arrays will all be one dimensional. Isuggest that you use three loops for your assignment: The firstloop should prompt the user for their twenty answers. It shouldalso capitalize their answer. The second loop should calculate thenumber or correct and incorrect answers. The third loop shoulddisplay the incorrect answers. You may combine the first and secondloops together if you like. SAMPLE OUTPUT: What is the answer forquestion 1: A What is the answer for question 2: d What is theanswer for question 3: A What is the answer for question 4: appleAnd so on until it asks for 20 answers *****PASSED***** Numbercorrect: Number incorrect: You got the following questions wrong:Question. Your Answer Correct then list under each header thequestion number answer inputed and what the correct answer is NotesYou can use the copy & paste method to enter test data. Thismakes testing easier. Make sure I show this to you before you leaveclass. Remember that you cannot use global variables in this class.Do not declare your array outside of main()). Don’t forget that youare not allowed to use break, continue, or System.exit() in thisclass. You may also not use return inside of main()(which isessentially the same as an exit). I suggest you write this programas one big main() procedure. Do not use other procedures orfunctions. I know this is at odds with the best practices ofmodular programming (chapters 3 and 6), but in this case you willavoid the problems by reference variables and passing arrays asparameters.
Expert Answer
Answer to Write A ********PYTHON PROGRAM************ Driver’s License Exam The local driver’s license office has asked you to … . . .
OR

