Jump to content

Fizz buzz: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Luigi30 (talk | contribs)
No edit summary
{{unreferenced}}
Line 1: Line 1:
{{cleanup-verify}}
'''FizzBuzz''' is variously a [[car game]], a [[drinking game]] or a [[computer programming]] exercise.
'''FizzBuzz''' is variously a [[car game]], a [[drinking game]] or a [[computer programming]] exercise.


Line 16: Line 17:


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:
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:

== References ==
{{unreferenced}}
<references />


[[Category:Car games]]
[[Category:Car games]]

Revision as of 11:49, 13 July 2006

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:

References