Claude Sonnet 4.6
9.7# Correct, clean, idiomatic implementation with thorough docstring, doctest-style examples, sensible input validation, and helpful usage demos, though extra validation exceeds task scope slightly.
inspect full trace →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, doctest-style examples, sensible input validation, and helpful usage demos, though extra validation exceeds task scope slightly.
inspect full trace →# Correct, clean implementation with clear docstring, doctest example, and additional demo block.
inspect full trace →# Correct, clean, well-documented implementation with thorough examples and sensible edge-case handling, only minor nit being the added ValueError not explicitly required by the task.
inspect full trace →# Correct, clean, well-documented solution with extra ValueError handling not required by the spec but reasonable; docstring example formatting (wrapped list) is slightly misleading vs actual doctest output but harmless since not run as doctest.
inspect full trace →