Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 4 : Calculating Exam Scores In this problem, you will use a loop to calculate scores for two students who have taking a multiple
Problem : Calculating Exam Scores
In this problem, you will use a loop to calculate scores for two students who have taking a multiplechoice exam with
questions. Assume that the correct answers on the exam are as follows:
Correct Answers: D B C A C D A C C B D A B D C D C D C A B D C B A
The answers submitted by the two students are provided below.
Student Answers: A B C A B D A A C B D A D C C B C D B A D D C C A
Student Answers: D A C A B D A C C B D A B D A D C D C A B C C B A
Perform the following steps in a single code cell:
Create lists of named correct, answers and answers to store the correct answers for the exam, as well
as the answers submitted by the two students. The answers should be stored as strings of the form AB
C and D
Create variables named count and count to store the number of correct answers for each student.
Use a single loop to simultaneously loop over all three lists. As you do so count the number of correct answers
for student and student
When the loop is finished executing, divide each count of correct answers by the total number of questions and
multiply by to obtain the grades for both students. Store the results as integers in variables named grade
and grade
Print the results with descriptive messages as shown below, with the xxxx symbols replaced with the
appropriate values. Match the format and spacing exactly.
Student Grade: xxxx
Student Grade: xxxx
No lists should be created for this problem other than the three described in Step Only one loop should be used in
this problem.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started