<jupyter_start><jupyter_text>Autograder SetupEnter your 8-digit PennID below:<jupyter_code>STUDENT_ID = 99999999<jupyter_output><empty_output><jupyter_text>Run the following cell to initialize the autograder.**NOTE:** Remember we store your submissions and check against other student's submissions... so, not that you would, but no cheating.<jupyter_code>grader = PennGrader(course_id = 'CIS545_Spr_2019', homework_id = 'CIS545_Spr_2019_HW1', student_id = STUDENT_ID)<jupyter_output><empty_output><jupyter_text>Question 1: Write an addition function!Fill in the function body of `addition_function` that takes in two numbers and returns their sum.<jupyter_code>def addition_function(x,y):
    return x + y<jupyter_output><empty_output><jupyter_text>Run the following cell to grade this question.<jupyter_code># Autograder Cell: Test Case #1
grader.grade(test_case_id = 'test_case_1', answer = addition_function)<jupyter_output>Correct! You earned 5/5 points. You are a star!

Your submission has been successfully recorded in the gradebook.<jupyter_text>Question 2:  Now write a Class!Add two class functions: `add_course` and `remove_course` that both take in a string representing a course ID.<jupyter_code>class Student:
    def __init__(self, name = 'John', email = 'john@email', courses = []):
        self.name = name
        self.email = email
        self.courses = courses 

    def get_coures(self):
        return self.courses 

    def add_course(self, course):
        self.courses.append(course)
    
    def remove_course(self, course):
        self.courses.remove(course)
# Autograder cell: Test case #2
grader.grade(test_case_id = 'test_case_2', answer = Student)<jupyter_output>Correct! You earned 5/5 points. You are a star!

Your submission has been successfully recorded in the gradebook.<jupyter_text>Question 3:  Finally, let's do some Pandas stuff!Run the following cell to load the dataset...<jupyter_code>import pandas as pd

students_df = pd.DataFrame([['Leonardo_Murri',100],['Akshay_Grewal',65]], columns = ['first_last_name','grade'])
students_df<jupyter_output><empty_output><jupyter_text>Use `.apply(...)` to keep only the last name in the `first_last_name` column.<jupyter_code>students_df['first_last_name'] = students_df['first_last_name'].apply(lambda x: x.split('_')[0])
students_df<jupyter_output><empty_output><jupyter_text>Now, rename the `first_last_name` column to `first_name`. Make sure your final dataframe is called `student_df`.<jupyter_code>students_df = students_df.rename(columns = {'first_last_name':'first_name'})
students_df<jupyter_output><empty_output><jupyter_text>Run the following cell to grade this question.<jupyter_code># Autograder cell: Test case #3
grader.grade(test_case_id = 'test_case_3', answer = students_df)<jupyter_output><empty_output><jupyter_text>View your score!You made it this far, run the following cell to double check we stored all your scores correctly.<jupyter_code>grader.view_score()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1010673782521681, 'fraction_numerical': 0.014342895263509006, 'mean_word_length': 6.3504901960784315, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '85989', 'license': 'MIT', 'n_tokens_mistral': 1022, 'n_tokens_neox': 970, 'n_words': 258, 'path': 'Test Client Notebook/Grader_Client.ipynb', 'repo_name': 'klmahesh/PennGrader', 'size': '2998'}