What does a FizzBuzz question in a Python interview actually test?
FizzBuzz asks you to print the numbers from 1 to n, replacing the multiples of three with the word Fizz, the multiples of five with the word Buzz, and the multiples of both with FizzBuzz. The twist is that the puzzle itself is not the point, because it is really a filter for basic fluency with the language.
What it reveals is whether you can write a loop that checks two conditions, whether you remember to use the modulo operator to test for divisibility, and whether you can produce the combined case instead of only the two separate ones. It also reveals whether you notice the ordering rule. A number that is divisible by fifteen has to print both words, and that is the case that most candidates forget on their first attempt.
It also tests whether you can read a specification carefully. The wording matters, because you have to know whether it says FizzBuzz or FizzBuzzBuzz, whether the output is separated by spaces or printed on separate lines, and what happens at the edges of the range. A candidate who asks those questions before writing a single line of code looks careful, and that is worth a lot.
What FizzBuzz does not test is difficult algorithm design. Nobody is impressed by a clever solution to FizzBuzz. The signal sits entirely in the basics, which are a clean loop structure, correct use of modulo, and handling the combined case. If you ever get stuck on the puzzle itself rather than on the syntax, that is worth knowing before the interview starts.