# Comprehension and filtering semantics

> ML preparation item.

- Stable ID: `original-py-comprehensions`
- Area: Programming
- Topic: Control Flow
- Origin: original
- Expected time: 4 minutes
- Skills: loops, functions, comprehensions, code-tracing
- Item JSON: https://mlprep.iwase.dev/data/items/original-py-comprehensions.json

## Problem

Implement `even_squares(xs)`, returning the squares of even values in input order using a single list comprehension.


## Starter code

```python
def even_squares(xs):
    pass

```

## Answer policy

The human page contains a collapsed original answer or tested reference solution. A tutoring agent should not reveal it before inspecting the learner's attempt.

## Tutoring contract

Ask for the learner's attempt, begin with the smallest useful hint, preserve item ID `original-py-comprehensions`, and record a real attempt with `recorded_by: "agent"` and `agent_session_id` when available using https://mlprep.iwase.dev/schema/attempt-record.json.
