You have been asked to write an application that automatically grades a quiz. The quiz has 15 multiple-choice questions. The correct answers are: 1.A, 2.C, 3.A, 4.B, 5.B, 6.D, 7.D, 8.A, 9.C, 10.A, 11.B, 12.C, 13.D, 14.C, 15.B The program will start by creating a list holding the quiz answers key shown above. It will then prompt the user for the student name and their answers file and read them into a separate list. It will finally compare the key vs. answers lists to calculate & display: Number of correct answers Number of incorrect answers Questions incorrectly answered. Whether the student has passed or failed the quiz A student must correctly answer 11 out of 15 questions to pass. The user can grade as many students as they wish.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 7TD
icon
Related questions
Question

Using introduction to Python

You have been asked to write an application that automatically grades a quiz. The quiz has 15 multiple-choice questions. The correct answers are:

1.A, 2.C, 3.A, 4.B, 5.B, 6.D, 7.D, 8.A, 9.C, 10.A, 11.B, 12.C, 13.D, 14.C, 15.B

The program will start by creating a list holding the quiz answers key shown above. It will then prompt the user for the student name and their answers file and read them into a separate list. It will finally compare the key vs. answers lists to calculate & display:

Number of correct answers
Number of incorrect answers
Questions incorrectly answered.
Whether the student has passed or failed the quiz
A student must correctly answer 11 out of 15 questions to pass.
The user can grade as many students as they wish.

Notes

  • The file containing the student’s answers is organized as 15 lines. Each line contains the answer to the corresponding question. The responses are single character strings, from A to D, uppercase.
  • Must use functional decomposition in your program implementation.
  • Use Exception Handling to catch file processing errors such as IOError, FileNotFoundError, etc.
  • You may use the A001Quiz.txt, B002Quiz.txt, and C003Quiz.txt files attached to t for testing purposes.

A001Quiz.txt :

A
C
C
B
B
C
D
A
B
B
B
C
D
D
B

B002Quiz.txt:

A
A
C
B
B
C
C
A
B
B
B
C
C
D
B

C003Quiz.txt:

A
C
A
B
B
D
D
A
C
A
B
C
D
D
B

Quiz Grading App
Enter name of student: Alicia Alvarez
11 quiz answers file: A001Quiz.txt
Alicia Alvarez Quiz Results
Correct Answers:
11
Incorrect Answers: 4 (3 6 9 10 )
Student PASSED the quiz.
Do you have another student (y/n)? y
Enter name of student: Brian Brown
quiz answers file: B002Quiz.txt
11
Brian Brown Quiz Results
Correct Answers:
8
Incorrect Answers: 7 (23 6 7 9 10 13 )
Student FAILED the quiz.
Do you have another student (y/n)? y
Enter name of student: Charlie Cummings
quiz answers file: C003Quiz.txt
11
Charlie Cummings Quiz Results
Correct Answers:
15
Incorrect Answers: 0
Student PASSED the quiz.
Do you have another student (y/n)? n
Transcribed Image Text:Quiz Grading App Enter name of student: Alicia Alvarez 11 quiz answers file: A001Quiz.txt Alicia Alvarez Quiz Results Correct Answers: 11 Incorrect Answers: 4 (3 6 9 10 ) Student PASSED the quiz. Do you have another student (y/n)? y Enter name of student: Brian Brown quiz answers file: B002Quiz.txt 11 Brian Brown Quiz Results Correct Answers: 8 Incorrect Answers: 7 (23 6 7 9 10 13 ) Student FAILED the quiz. Do you have another student (y/n)? y Enter name of student: Charlie Cummings quiz answers file: C003Quiz.txt 11 Charlie Cummings Quiz Results Correct Answers: 15 Incorrect Answers: 0 Student PASSED the quiz. Do you have another student (y/n)? n
Exception Handling
Quiz Grading App ...
Enter name of student: David Davenport
11 quiz answers file: D004Quiz.txt
Error ...
could not process D004Quiz.txt
Do you have another student (y/n)? n
Transcribed Image Text:Exception Handling Quiz Grading App ... Enter name of student: David Davenport 11 quiz answers file: D004Quiz.txt Error ... could not process D004Quiz.txt Do you have another student (y/n)? n
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

your code does not run Exception Handling correctly like shown in my 2nd picture . Can you please fix it ?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

can u please send screenshot of code for the alignement/ indentation 

thank you

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning