Python Test
Python Test
Python Test
1. Please note that you have to upload the solutions before the deadline to the course portal
2. Please use Python 3 for answering the following questions in case if you need to use Python. Also
write a short report/note on the assignment explaining your assumptions/your design
choices/functionality etc. to understand your code in a better manner. It is also a good practice to
use comments extensively in your code, so that it will be easy for other people to understand it.
3. The Python code for answering the questions can be either submitted as one single jupyter
notebook or multiple jupyter notebooks. I n addition to submitting your jupyter notebook/
notebooks, please also export the Python code as a file from the jupyter notebook ( ’File’ –>
’Download as’ –> ’Python (.py)’ ) and upload the exported Python code file, in addition to jupyter
notebook, as we have seen many times the jupyter notebook fails load due to mismatch of
versions/OS etc.. Alternatively, if you are using any other IDE (Integrated development
environment), then you can also submit your code as one single python file (with .py extension)
containing all the source code from different classes/modules/functions etc. You can also add all the
code files (.py, jupyter notebooks etc.) into one zip file and upload the zip file along with the main
report file to the course portal.
Program Specification
Let’s imagine a hypothetical situation that our college has now planned to introduce a new Diploma
programme for Data Science with the following four courses:
Imagine that you are hired as a lead developer to develop a system for managing the Diploma
Programme for Data Science. You are asked to develop the system (a program) in the Python
language by duly incorporating object-oriented programming features so that the system will be
easy to maintain, debug and also to extend the functionality later on if necessary. The following are
the key requirements of diploma programme for Data Science.
a) In order to ensure the quality of the students graduating from this programme, the course
management has introduced 5 mandatory assignments in each course. The mandatory assignments
from each course are graded as either Pass or Fail. To pass a course, a student has to pass at least 3
out of 5 mandatory assignments for that course.
b) In order to pass the whole diploma programme in Data Science successfully, a student needs to
pass all the courses individually, by meeting up the requirements of passing 3 out of 5 mandatory
assignments, in each course of the diploma programme.
c) Additionally, a student can also get a diploma certificate with distinction, if the student passes at
least 17 mandatory assignments (out of a total of 20 assignments) from all the courses. Please note
that this design choice chosen by course coordinators will make sure that a student, who wants a
distinction, will have to pass all the 5 mandatory assignments from at least one single course (and 4
out of 5 assignments for the remaining 3 courses) to qualify for the distinction. Finally, if some of the
requirements are not clear from the above requirements specification, please make suitable
assumptions and describe/specify your assumptions about the functionality in the report.
Your Program
You MUST develop a program using Python language that will satisfy the functionality specified
above. Based on your understanding and interpretation, there are many ways to develop such a
program to satisfy above requirement specification. Therefore, please use your creativity to come up
with a suitable design, that is which class will contain which functionality, which methods and so on.
Please also keep your main focus to use various good programming techniques and practices that
you have learnt in this course. For example, you should use proper exception handling with
appropriate error messages at suitable places where you can expect exceptions and errors in your
programme. The final output of your implementation should be a bunch of Python classes with some
example code for testing the use cases/ scenarios such as
4. To get an overview at the diploma programme/course level to see how many students passed the
programme and similarly
5. Test code to show the lists of students: a) who passed with distinction, b) passed and c) failed.