Package: quizapp
QuizappThe quizzing app is an interactive application that enables teachers to create and manage quizzes, and students to take each quiz. Each quiz must be multiple choice and contain a single answer. Upon quiz completion, students can view their quiz score and score averaged across all quizzes. Teachers can view all student quiz scores. Some features of quizapp include:The student selecting which course they want to take a quiz for.Saving the students score for each quiz and storing in a file for a given course.Outputting the student's average quiz score of all quizzes taken by a given student to the screen.Teachers can create new quizzes.Teachers can view and modify student quiz scores.Teachers can calculate and display overall quiz statistics for any courseProject StructureMain package name isquizapp. It contains amain.pymodule and two sub-packages:studentandteacher. The student sub-package contains two modules:readquiz.pyandtakequiz.py. The teacher sub-package contains two modules:createquiz.pyandcheckstudentscores.py. There is an assets directory which contains data files for quizzes and scores.student sub-packageThe student sub-package contains two modules to handle the flows that a student user will interact with:readquiz.py:This module involves reading individual quizzes, enabling student users to complete them. This is accomplished with 2 classes and 4 functions:class Quiz:This consists of a quiz object with three attributes, thename(i.e. course code) of a quiz, the individualproblemsin a quiz, and the totalnumber of problems.class Problem:This consists of a problem object with three attributes, thequestionitself, the multiple choiceoptionsfor a question, and theanswer.read_quiz():Individual quizzes stored as json files are outputted to the screenget_available_courses():Lists all available quizzes students can takesave_score():Saves the score a student achieved into a csv file of student quiz scoresget_percentage():Converts a students quiz score into a percentage.takequiz.py:This module handles the flow of student users taking quizzes. This is accomplished with 1 classes and 3 functions:class Student:This consists of a student object with two attributes,student nameandstudent numberstudent_handler():Initializes a student's name and number into a Student class objectstart_quiz():The function where a student actually completes the quizselect_quiz():Displays all available quizzes then prompts a student to select a quiz to complete.teacher sub-packageThe teacher sub-package contains module to handle the flows that a user with teacher role will interact with. It contains two modules:createquiz.py:This module handles the workflow of creating a quiz through an interactive menu through which a teacher can add a quiz for a course. It achieves this using the following methods:create_quiz():This serves as a driver function to create a quiz and then writes the quiz into a JSON file in the appropriate directory with the appropriate filename.questionInput():Takes the user input for questions, options and the answer and creates an object for the same.create_score_csv():Creates a template score file whenever a new quiz is added. After each student has taken the quiz, their score is saved to the file created using this method.convert_to_json():Converts the quiz from a dictionary object to JSON object and writes object into a JSON file.checkstudentscores.py:This module handles the workflow of viewing the scores for the quiz by the teacher and also allows them to view other statistics like mean, minimum, maximum etc. It achieves this using the following methods:get_student_scores():It displays the student's quiz score for a course by taking student number and course code as arguments.set_student_scores():It modifies the student's score if there is an error in the quiz.quiz_score_statistics():It calculates and display metrics like average, minimum, maximum etc. for the course grade of all students.score_driver():This is the driver method allowing the teacher to view a students mark, modify a students mark, calculate quiz summary statistics, or leave the program.quiz_or_score():This is the driver method directing teacher to create a quiz, check quiz score marks, or leave the program