> Source URL: /ai-and-sports/weeks/week-4.module
# Week 4: Team Breakdown - Become a Sports Analyst

---

## Overview

In this week, you will break down a season of games to uncover patterns like analysts do.

---

## New Skills

- Use conditionals to label wins and losses
- Filter data with multiple conditions
- Search and group results
- Sort games to find biggest wins and losses
- Load and analyze season-style CSV data

---

## Review

Here's a quick refresher on the skills you learned last week. You'll use all of these again this week!

**Lists** — A list stores multiple items in one variable. You can access each item by its position (index).

```python
scores = [105, 98, 112, 88]
print(scores[0])  # prints 105
```

**Loops** — A `for` loop repeats code for every item in a list, so you don't have to write the same thing over and over.

```python
for score in scores:
    print(score)
```

**Conditions (`if/else`)** — An `if` statement checks whether something is true or false and decides what to do next.

```python
if score > 100:
    print("Great game!")
else:
    print("Room to improve.")
```

**Loading a CSV file** — A CSV file is a simple text file where data is separated by commas. You can load it into Python so your program can work with real data instead of typing everything by hand.

```python
import csv

with open("games.csv", "r") as file:
    reader = csv.DictReader(file)
    for row in reader:
        print(row)
```

---

## AI Resources

[>button: 🤖 Coding with AI Guide](../../resources/coding-with-ai.resource.md)

---

## Setup and Resources

---

## Discord

Make sure you have joined the course Discord so we can send you update and links.

[>button: 💬 Join the Course Discord](https://discord.com/channels/1446963501040926802/1447338288859054121)

---

## Project

[>button: Start Your Project!](../projects/4-team-breakdown/team-breakdown.project.md)


---

## Backlinks

The following sources link to this document:

- [Team Breakdown: Become a Sports Analyst](/ai-and-sports/index.path.llm.md)
