Anthropic interview question

Implement some business logic in Python