Generate {{language}} code for the following requirement:

{{requirement}}

Requirements:
- Clean and readable code
- Proper error handling
- Include comments where necessary
- Follow {{language}} best practices
