Jump to content

Fizz buzz

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Luigi30 (talk | contribs) at 22:22, 11 May 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

FizzBuzz is variously a car game, a drinking game or a computer programming exercise.

The aim is to count one number in turn. However, any number divisible by three is replaced by the word Fizz and any divisible by five by the word Buzz. Numbers divisible by both become FizzBuzz. A player who hesitates or makes a mistake is eliminated. Play continues until there is only one player left, the winner.

Play proceeds like this:

  • 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, FizzBuzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, FizzBuzz, 31, 32, Fizz, 34, Buzz, Fizz, and so on

A variant is to replace "divisible by" with "has that number in it" which results in:

  • 1, 2, Fizz, 4, Buzz, 6, 7, 8, 9, 10, 11, 12, Fizz, 14, Buzz, 16, 17, 18, 19, 20, 21, 22, Fizz, 24, Buzz, 26, 27, 28, 29, Fizz, Fizz, Fizz, Fizz, Fizz, FizzBuzz, Fizz, Fizz, Fizz, Fizz, 40, 41, 42, Fizz, 44, Buzz, and so on.

As a drinking game both variants can be applied together, like this:

  • 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, Fizz, 14, FizzBuzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, Fizz, Fizz, Buzz, 26, Fizz, 28, 29, FizzBuzz, Fizz, Fizz, Fizz, Fizz, FizzBuzz, Fizz, Fizz, Fizz, Fizz, Buzz, 41, Fizz, Fizz, 44, FizzBuzz, and so on.

Many other variants of the game exist around the world. Some of these involve using alternate numbers for Fizz and Buzz. Others use alternate words or gestures in lieu of saying Fizz, Buzz, or the normal numbers: