Claude Haiku 4.5
9.7correctness 10.0quality 9.0documentation 10.06454ms
# Correct, clean, idiomatic implementation with thorough docstring, examples, and even added input validation beyond requirements.
Classic FizzBuzz — tests basic correctness and code style
Write a Python function `fizzbuzz(n: int) -> list[str]` that returns a list of strings for numbers 1 through n: 'Fizz' for multiples of 3, 'Buzz' for multiples of 5, 'FizzBuzz' for multiples of both, and the number as a string otherwise. Include a docstring and at least one usage example.
Does the function handle all four cases correctly? Does it return a list?
Is the code clean, idiomatic Python? Good variable names? No unnecessary complexity?
Is there a clear docstring? Is there a usage example?
# Correct, clean, idiomatic implementation with thorough docstring, examples, and even added input validation beyond requirements.