> Source URL: /demos/cs1-path/projects/project-1.spec
---
project_number: 1
title: Data Explorer
outcomes: [1, 2, 3, 6]
difficulty: beginner
prerequisites: [lab-01, lab-02, lab-03]
estimated_time: 3-5 hours
due_date: Week 5
---

# Project 1: Data Explorer

## Overview

In this project, you'll build a program that analyzes a dataset and presents interesting findings. You'll practice using variables, conditionals, and loops to process real data and generate a summary report.

This is your first multi-part project—take it step by step, and don't hesitate to ask for help!

## Learning Objectives

This project assesses your ability to:

- Store and manipulate data using variables ([Outcome 1: Variables & Data Types](../course.outcomes.md))
- Use conditionals to make decisions based on data ([Outcome 2: Control Flow](../course.outcomes.md))
- Use loops to process multiple data items ([Outcome 3: Iteration](../course.outcomes.md))
- Break down a problem into smaller steps ([Outcome 6: Problem Solving](../course.outcomes.md))

## The Dataset

You'll work with weather data for a city over 7 days. The data is provided as a list of daily high temperatures (in Fahrenheit):

```python
# Weather data: daily high temperatures for one week
temperatures = [72, 68, 75, 80, 77, 71, 69]
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
```

Copy this data into your program to get started.

## Requirements

### Functional Requirements

Your program must:

1. **Calculate the average temperature** for the week
2. **Find the highest and lowest** temperatures and which days they occurred
3. **Count** how many days were above 75°F (hot days) and below 70°F (cool days)
4. **Classify each day** as "Hot" (>75), "Mild" (70-75), or "Cool" (<70)
5. **Print a formatted report** showing all findings

### Output Format

Your program should produce output similar to this:

```
=== Weekly Weather Report ===

Daily Breakdown:
Monday: 72°F (Mild)
Tuesday: 68°F (Cool)
Wednesday: 75°F (Mild)
Thursday: 80°F (Hot)
Friday: 77°F (Hot)
Saturday: 71°F (Mild)
Sunday: 69°F (Cool)

Summary:
- Average temperature: 73.1°F
- Highest: 80°F on Thursday
- Lowest: 68°F on Tuesday
- Hot days (>75°F): 2
- Cool days (<70°F): 2
```

### Technical Requirements

Your code must:

- Use a loop to process the temperature data (no copying/pasting 7 if-statements!)
- Use meaningful variable names
- Include comments explaining your approach
- Run without errors

## Getting Started

### Step-by-Step Approach

Don't try to do everything at once! Here's a suggested order:

1. **Start simple**: Just print each day and temperature
2. **Add classification**: Add the Hot/Mild/Cool label to each day
3. **Calculate average**: Sum all temperatures, divide by count
4. **Find extremes**: Track the highest and lowest as you loop
5. **Count categories**: Count hot and cool days
6. **Format output**: Make it look nice

### Starter Code

```python
# Weather data
temperatures = [72, 68, 75, 80, 77, 71, 69]
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]

# TODO: Your code here!

# Hint: You can loop through both lists at once using index
for i in range(len(days)):
    day = days[i]
    temp = temperatures[i]
    print(day, temp)
```

### Helpful Techniques

**Calculating an average:**

```python
total = 0
for temp in temperatures:
    total = total + temp
average = total / len(temperatures)
```

**Tracking the maximum:**

```python
highest = temperatures[0]  # Start with first value
for temp in temperatures:
    if temp > highest:
        highest = temp
```

**Formatting decimals:**

```python
average = 73.14285714
print(round(average, 1))  # Prints: 73.1
```

## Rubric

See the [Project 1 Rubric](project-1.rubric.md) for detailed grading criteria.

### Grading Summary

| Criterion     | Points  |
| ------------- | ------- |
| Correctness   | 40      |
| Code Quality  | 30      |
| Output Format | 20      |
| Documentation | 10      |
| **Total**     | **100** |

## Submission

1. Name your file `weather_report.py`
2. Push to your GitHub repository by **Week 5**
3. Verify your code runs without errors before submitting

## Academic Integrity

- You may discuss approaches with classmates, but write your own code
- You may use course materials and notes
- You may NOT copy code from the internet or other students
- You may NOT use AI to write your code (using it to understand concepts is OK)

## Getting Help

- Start early—don't wait until the day before!
- Office hours are great for getting unstuck
- Post conceptual questions on the discussion forum
- Come to the project work session in Week 4


---

## Backlinks

The following sources link to this document:

- [Project 1: Data Explorer](/demos/cs1-path/index.path.llm.md)
- [Project 1: Data Explorer](/demos/cs1-path/course.outcomes.llm.md)
- [Project 1: Data Explorer](/demos/cs1-path/feedback/ax7k-project-1.feedback-harness.llm.md)
- [Project 1: Data Explorer](/demos/cs1-path/projects/project-1.rubric.llm.md)
- [Project 1 Assigned](/demos/cs1-path/course.schedule.llm.md)
