Module Assessment

Overview

Congratulations on completing the Introduction to Python for Data Science module! You've covered a lot of ground — from variables and data types, through functions, strings, conditional logic, lists, and dictionaries, to the fundamentals of object-oriented programming. This assessment is your opportunity to demonstrate that you can apply these skills together to solve realistic data problems.

Complete the assessment using this Colaboratory notebook.

Learning Objective

By the end of this assessment, you will have demonstrated your ability to:

  • Validate Python fluency (variables, functions, data structures).
  • Practice writing clean, modular code.

Key terms

Modular code: Code that is organized into small, focused functions and classes, making it easier to read, test, and reuse.

Data pipeline: A series of processing steps applied to raw data to produce a clean, analysis-ready result.

Assessment Overview

This module assessment is a coding project completed in a Google Colaboratory notebook. You will work with a small dataset and complete a series of tasks that exercise each skill area from the module.

Skills Assessed

SkillLesson
Variables & data typesIntro to Python
FunctionsFunctions
String manipulationStrings
Conditional logicConditional Logic
List operationsLists
Dictionary operationsDictionaries
Classes & objectsObjects

Coding Assessment

Complete the project in this notebook. The notebook contains a series of guided tasks. After completing all tasks, save your notebook to GitHub and submit it to the AI Grader for grading.

Task Overview

The notebook will walk you through:

  1. Loading and inspecting raw data — You will be given a list of dictionaries representing student records. Use variables, print(), and len() to explore the dataset.

  2. Cleaning string data — Write a function that accepts a student record and returns a cleaned version with names properly capitalized and extra whitespace removed.

  3. Classifying records with conditional logic — Write a function that accepts a GPA value and returns the corresponding letter grade using if/elif/else logic.

  4. Filtering and transforming with lists — Use list comprehensions to extract only the students who are passing (GPA ≥ 2.0) and to compute a curved score list.

  5. Summarizing with dictionaries — Build a summary dictionary that counts how many students received each letter grade.

  6. Building a class — Define a StudentRoster class with an __init__() method that stores a list of student records, and at least two methods: one that prints a summary report and one that returns the student with the highest GPA.

Grading Rubric

CriteriaPoints
Variables and data types used correctly10
Cleaning function works correctly with edge cases15
Grade classification function handles all ranges15
List comprehensions produce correct results15
Summary dictionary is accurate15
StudentRoster class is correctly defined and working20
Code is readable, well-named, and modular10
Total100

Knowledge Check

Question 1: Which of the following best describes "modular code"?

Question 2: A teammate's function uses a variable named `x` to store a student's GPA. What is a better variable name and why?

Question 3: You have a list of student records (each a dictionary) and want to collect only those with a GPA above 3.5. Which approach is most Pythonic?