Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please attach the OUTPUT Please attach the OUTPUT 10.3 Exercises 1. Create a file named studAnswers.txt as shown below. This file contains answers of 10
Please attach the OUTPUT
Please attach the OUTPUT
10.3 Exercises 1. Create a file named studAnswers.txt as shown below. This file contains answers of 10 students for 10 objective questions asked in a quiz. Each line of the file contains a student's id followed by her/his answers for question 1 to 10. x StudAnswers -- File Edit Format View Help 501 ACDCABBCCD SO2 ACDAABADCD SO3 ACCABBBCCD S04 ABDABCBDCD S05 BCCAABBDCB S06 ABDB ABCDCC S07 CBDBACBDBD S08 ADDCAA BCCD 509 BCCABBBDCD 510 BCDAABBDCB U Write a program that opens the studAnswers.txt file for input. The program calculates the number of right answers of each student (in each line of the file) and the marks scored by the student for the quiz. Then, the results are written to the output file named studResult.txt. (Assume that the answers for question 1 to 10 are A, C, D, A, A, B, B, D, C, D in sequence and the total marks for the quiz is 5%)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