Question: Online Quiz Grader Program The online multiple-choice-quiz grader has gone down, so they want you to write a program in python (quizGrader.py) to grade the
Online Quiz Grader Program The online multiple-choice-quiz grader has gone down, so they want you to write a program in python (quizGrader.py) to grade the classs online quizzes. The student file names are lastname_firstname.
| Quiz 1 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| A | C | A | A | A |
| B | B | B | B | B |
| A | A | A | B | B |
| C | C | C | C | C |
| Quiz 2 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| C | C | C | C | C |
| D | D | D | D | A |
| D | C | D | C | D |
| B | B | B | A | B |
| B | B | D | B | B |
| A | A | A | A | A |
| B | D | B | D | B |
| Quiz 3 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| C | A | C | C | C |
| D | D | D | D | D |
| D | D | D | D | D |
| A | A | A | A | A |
| B | B | B | B | B |
| A | A | A | A | A |
| C | C | C | C | C |
| Quiz 4 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| D | A | D | A | D |
| B | B | B | B | B |
| B | A | B | B | B |
| A | C | A | A | A |
| B | B | B | B | B |
| Quiz 5 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| C | C | C | C | C |
| D | D | D | D | D |
| D | C | D | D | D |
| B | B | B | B | B |
| B | B | D | B | B |
| A | A | A | A | A |
| B | D | B | B | B |
| Quiz 6 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| A | A | A | A | A |
| B | B | B | B | B |
| C | C | C | C | C |
| C | C | C | C | C |
| D | D | D | D | D |
| A | A | A | A | A |
| C | C | C | D | C |
| Quiz 7 answers | Doe_Jane | Jones_Tom | Kidd_Billy | Smith_Sally |
| D | A | D | A | A |
| B | B | B | B | B |
| B | A | B | B | C |
| A | C | A | A | C |
| B | B | B | B | D |
Your program (called quizGrader.py) should run from inside the hw directory (i.e., develop it inside the hw directory) to generate a gradeReport.txt file that looks something like: Student quiz Report
| Student | Total Quiz Points | Overall Quiz % |
| Doe, Jane | 30 | 71.4 |
| Jones, Tom | 40 | 95.2 |
| Kidd, Billy | 35 | 83.3 |
| Smith, Sally | 36 | 85.7 |
| Points possible | 42 |
Heres a similar example File: changeDirectory.py Description: Simple program to demonstrate the os module function "chdir" which changes the current working directory. The program prints the contents of the initial directory and any subdirectory one-level under it. """ import os.path import os
def main(): print("The contents of the INITIAL directory is:") directoryList = os.listdir('.') # '.' indicates the current directory for dirItem in directoryList: if os.path.isdir(dirItem): print("DIRECTORY:",dirItem) else: print("FILE:", dirItem)
for dirItem in directoryList: if os.path.isdir(dirItem): os.chdir(dirItem) # Go into subdirectory displayCurrentWorkingDirectory() os.chdir('..') # Go up into initial directory # '..' indicates the parent directory
def displayCurrentWorkingDirectory(): """ Display contents of the current directory """ print(" *3") print("The current working directory is:",os.getcwd()) print("The contents of the current working directory is:") directoryList = os.listdir('.') # '.' indicates the current directory for dirItem in directoryList: print(dirItem) print()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
