Assignment 582

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Question 1 (35%): A simple student management system (Back to Beginning)

Write a Python program to manage the students enrolled in a unit. The


program will display a menu that allows the user to perform different
operations repeatedly. The menu must include the following items:

1. add the details of a student to the system, including the student number, the
student name, and the unit mark
2. search for students based on the student number or student name and display
the details of the matching students. The name search must be case-
insensitive and must allow for a partial match, for example, the search key
"john" would be matched by "John Smith" and "Elton Johns"
3. display the names of the students with a given unit grade (HD, D, C, P and
N). Use Murdoch University's grade system to convert marks to grades.
4. delete a student's record from the system
5. quit: to quit the program

You should use a list to store the information about all students. In the list,
each list item is a dictionary containing one student record.

Question 2 (35%): Load student records from the file and saves them to the
file (Back to Beginning)

Revised your solution to Question 1 to add additional features: when the
program starts, it first loads the student records from the
file students.csv inside the current directory. In addition, the user can load
the student records from a CSV file and save the student records maintained
by the system to a Microsoft Excel CSV file. Correspondingly, two more
menu items should be added to the menu:

6. load student records from a CSV file. The program should prompt the user
to provide a file path. The student records from the file are added to those
student records already in the memory. Check for duplicates of student
records (ie, records with the same id): in case of duplicate, the one from the
file should be ignored.
7. save the student records in the current system to a CSV file. The program
should prompt the user to enter a file path. If the file exists, warn the user
and give the user the option of either changing the file name, overwriting the
file, or cancel the operation.

You should use Python's builtin module csv to handle CSV files.

Question 3 (20%): Display grade distribution in charts (Back to Beginning)


Revised your solution to Question 2 by adding the following additional
features:

 to increase the system efficiency, replace the list used to store the student
records with an ndarray from the NumPy module..
 to display the grade distribution using a bar chart. The bar chart must have a
title and labels for both X-axis and Y-axis.

To incorporate the chart-displaying feature, add one more menu item to the
program menu:

8. display grade distribution

You may use Python modules numpy and matplotlib for this question.

Documentation and Submission Requirements (Back to Beginning)

Your assignment must be submitted in the form of a single zip archive file
to the LMS. No other format will be accepted. The zip file must be named
in the following format:
Assignment_<your first name><your last name>.zip

For example, the student, John Smith, would name his zip file
as Assignment_JohnSmith.zip

Your zip archive file must contain the following files/folders:

 One PDF document named Assignment.pdf. See the detailed requirements of


this file later in this section.
 Three folders named q1, q2 and q3 for each of the three questions. Each
folder must contain all files for the question, including the Python code and
data files (if any).

If you only include one folder containing a single program satisfying the
requirements of Question 3, you will be awarded a maximum of 20 marks,
even if the program also satisfies the requirements of the first two
questions.

The file Assignment.pdf

You might also like