Data and program overview
In this assignment you will be working with data on student enrollment in classes of the Boston School of Magic. The data includes
A list of courses included in two certificate programs of the school (descriptions of programs provided in txt and program2.txt)
Course prerequisites structure (txt)
Class lists, including grades, for students who took these courses in the past as well as those who are taking the courses now (2019-20). Each class list comes in a separate file, the first line of which includes the course number, preceded with letter ‘c’, e.g. Each such file stores records of students who were/are enrolled in course number 1250. (those files that contain -1 instead of a grade are current semester files, for which grades have not been posted yet.)
There is a lot of useful information that can be derived from this data, such as, how many students are eligible for a diploma in each of the two programs, etc. In this assignment, you will be creating a program that uses this data to estimate the number of students who would be eligible for taking a specific course. An
eligible student:
has completed all prerequisites for the course, and
has not taken it in any prior
Boston School of Magic allows students to enroll in any course, regardless of the program.
I provide two data sets for this assignment, in zip files called data-small.zip and data-large.zip. Download and unzip the files in your project folder. Unzipping should result in two folders added to your project folder: files-small and files-large. Review the contents of the files before you start, to familiarize yourself with their structure.
The program that you write must work as follows.
Ask the user to specify the subfolder in the current working directory, where the files are
Ask the user for a course number, outputting the number of eligible students in response. Incorrect course numbers should be ignored and the program should go on. When the user does not specify any course number, pressing enter instead, the program should
The sample interaction demonstrates the running of the program.
Sample interaction
Please enter the name of the subfolder with files: files-small
Enter course number or press enter to stop: 1100
There are 17 students who could take course 1100 Charms. Enter course number or press enter to stop: 2300
There are 2 students who could take course 2300 Care Of Magical Creatures. Enter course number or press enter to stop: 2470
There are 19 students who could take course 2470 Magical Theory. Enter course number or press enter to stop: 45
There are 0 students who could take course 45 None Enter course number or press enter to stop:
Important Notes and Requirements
Your program should not use any global variables and should have no code outside of function definitions, except for a single call to main.
All file related operations should use device-independent handling of paths (use getcwd() and
os.path.join() functions to create paths, instead of hardcoding them).
You must define and use functions specified below in the Required Functions You may and should define other methods as appropriate.
You should use data structures effectively to efficiently achieve the goals of your functions and programs.
Required Functions
You must define and use the following functions, plus define and use others as you see fit:
Function processProgramFile(), which will be used to read information about programs and store it in an easily accessible form for retrieval. It must be passed a single parameter of type str, providing the path to a program description file. The function should construct a dictionary based on the information in the file. The dictionary should have keys equal to the course numbers, and values for keys equal to the corresponding course titles, g.
{'1001': 'Transfiguration.', '1100': 'Charms.', '1250': 'Defense Against The
Dark Arts.', '1380': 'Potions.', '1420': 'Arithmancy.', '2075': 'Flying.'}
The function must return a tuple, consisting of the program name and the created dictionary.
Function processPrereqsFile(): This function will be used to read information about the prerequisites structure and store it in an easily accessible form for retrieval. It must be passed a single parameter of type str, providing the path to a file defining prerequisites. The function should construct a dictionary based on the information in the file. A line in the file of the form 1250: 1001 1100 indicates that 1250 has two prerequisite courses: 1001 and 1100. The dictionary should have keys equal to the course number, and values for keys equal to the corresponding prerequisite courses. Only courses that have prerequisites should be included in this
The function must return the constructed dictionary.
Function processClassFiles():This function will help in combining the data about enrollments into courses from multiple files into a single dictionary organized by course number. It must be passed a single parameter, defining the subfolder with the class list files, as outlined in the Data The
function should construct a dictionary with keys corresponding to course numbers. The value for each key must be equal to the set of students who have taken or are taking the course designated by the key.
The function must return the constructed dictionary.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme