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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education