$24
Instructions
Each step indicates the relevant section of the primer_3.0, where you can find help on this issue.
To work on HW4:
build a HW4 directory under your home directory (cs103sp22)
start Jupyter Notebook and from dashboard navigate to hw4 folder
create hw4.ipynb in hw4 folder
for each question, you need to first define the proper function and call the function with the given test cases
in the notebook, create the myName and myBlazerID functions which returns your name and your blzerid (the same function you had in hw1)
Create docstrings for each function (-2 points for each missing docstrings)
once you are confident that your code works, submit on Canvas
CS103 – Homework 4
Mandatory Functions
The following functions should be implemented, and the return statements should be modified with the correct credentials. Do not forget to call the functions
def myName():
return “James Bond”
def myBlazerID():
return “jbon12”
# Call these functions
print(“My Name is =”, myName(), “ and my BlazerId is =”,myBlazerID())
File Operations
Read the students_database.csv file and develop the necessary functions to find an answer to the following questions. Your functions must work on all files that have the same features (same column names), thus you should not hard code your solutions.
How many Advisors do we have? Display their names.
What is the full name of the student who has the lowest GPA? If we have multiple, print them all.
What are the average credit hours of the Biology Department?
What is the average GPA of the students whose advisor is “Bruce Wayne”? Are these students working as a TA?
Display the list of departments along with the total number of students.
For ex:
Computer Science: 16
History:9
….
….