Fizz buzz: Difference between revisions
tidy up white space, add some more variants |
updated the bare URL reference |
||
(310 intermediate revisions by more than 100 users not shown) | |||
Line 1: | Line 1: | ||
{{short description|Group word game to teach mathematical division}}{{One source|date=June 2024}} |
|||
'''FizzBuzz''' is variously a [[car game]], a [[drinking game]] or a [[computer programming]] exercise. Played as a car game to pass the time on long journeys, it also helps young children learn their ''times tables''. As a drinking game it produces mirth as competent arithmeticians become incapable of simple maths due to alcohol! |
|||
'''Fizz buzz''' is a group word game for children to teach them about [[division (mathematics)|division]].<ref>{{cite book |last=Rees |first=Janet |title=Fizz Buzz: 101 Spoken Numeracy Games – Ideal for Mental Maths |date=2002 |publisher=Learning Development Aids |isbn=978-1855033528 }}</ref> Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz", and any number divisible by both three and five with the word "fizzbuzz". |
|||
⚫ | The |
||
== Play == |
|||
Play proceeds like this: |
|||
⚫ | Players generally sit in a circle. The player designated to go first says the number "one", and the players then count upwards in turn. However, any number [[division (mathematics)|divisible]] by three is replaced by the word ''fizz'' and any number divisible by five by the word ''buzz''. Numbers divisible by both three and five (i.e. divisible by fifteen) become ''fizz buzz''. A player who hesitates or makes a mistake is eliminated. |
||
For example, a typical round of fizz buzz would start as follows: |
|||
{{blockquote|1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ...}} |
|||
== Other variations == |
|||
''Note'': In this variant of the game every Buzz is either followed or preceded by a Fizz. |
|||
In some versions of the game, other divisibility rules such as 7 can be used instead. Another rule that may be used to complicate the game is where numbers containing a digit also trigger the corresponding rule (for instance, 52 would use the same rule for a number divisible by 5). |
|||
== Programming == |
|||
A variant is to replace "divisible by" with "has that number in it" which results in: |
|||
Fizz buzz (often spelled '''FizzBuzz''' in this context) has been used as an interview screening device for [[computer programmers]]. Writing a [[computer program|program]] to output the first 100 FizzBuzz numbers is a relatively trivial problem requiring little more than a loop and conditional statements in any popular language, and is thus a quick way to weed out applicants with absolutely no programming experience.<ref>{{cite web |url=https://blog.codinghorror.com/why-cant-programmers-program/ |title=Why Can't Programmers.. Program? |first=Jeff |last=Atwood |date=26 February 2007 |access-date=July 30, 2024}}</ref> |
|||
== References == |
|||
*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. |
|||
<references /> |
|||
== External links == |
|||
As a drinking game both variants can be applied together, like this: |
|||
* [https://rosettacode.org/wiki/FizzBuzz Rosetta Code: Fizz Buzz at Rosetta Code] |
|||
* [http://philcrissman.net/posts/eulers-fizzbuzz/ Euler's FizzBuzz], an unorthodox programmatic solution making use of [[Euler's theorem]] |
|||
* [https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition Enterprise FizzBuzz], Comical 'enterprise' implementation of FizzBuzz with intentional verbosity |
|||
⚫ | |||
*1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, 10, 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. |
|||
[[Category:Children's games]] |
|||
[[Category:Mathematical games]] |
|||
Many other variants of the game exist around the world. These include: |
|||
[[Category:Division (mathematics)]] |
|||
*Use five (Fizz) and seven (Buzz) instead of three and five. |
|||
*Start again at 1 whenever anyone makes a mistake; in this way raising the maximum score becomes a team exercise. |
|||
*Nod silently instead of saying a normal number, so the game goes like this: (nod), (nod), "Fizz", (nod), "Buzz", "Fizz", (nod), ... |
|||
*Play completely silently, using a nod for a normal number and some other actions (such as shaking the head, or touching the nose) for Fizz and Buzz. |
|||
⚫ |
Latest revision as of 19:04, 30 July 2024
This article relies largely or entirely on a single source. (June 2024) |
Fizz buzz is a group word game for children to teach them about division.[1] Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz", and any number divisible by both three and five with the word "fizzbuzz".
Play
[edit]Players generally sit in a circle. The player designated to go first says the number "one", and the players then count upwards in turn. However, any number divisible by three is replaced by the word fizz and any number divisible by five by the word buzz. Numbers divisible by both three and five (i.e. divisible by fifteen) become fizz buzz. A player who hesitates or makes a mistake is eliminated.
For example, a typical round of fizz buzz would start as follows:
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ...
Other variations
[edit]In some versions of the game, other divisibility rules such as 7 can be used instead. Another rule that may be used to complicate the game is where numbers containing a digit also trigger the corresponding rule (for instance, 52 would use the same rule for a number divisible by 5).
Programming
[edit]Fizz buzz (often spelled FizzBuzz in this context) has been used as an interview screening device for computer programmers. Writing a program to output the first 100 FizzBuzz numbers is a relatively trivial problem requiring little more than a loop and conditional statements in any popular language, and is thus a quick way to weed out applicants with absolutely no programming experience.[2]
References
[edit]- ^ Rees, Janet (2002). Fizz Buzz: 101 Spoken Numeracy Games – Ideal for Mental Maths. Learning Development Aids. ISBN 978-1855033528.
- ^ Atwood, Jeff (26 February 2007). "Why Can't Programmers.. Program?". Retrieved July 30, 2024.
External links
[edit]- Rosetta Code: Fizz Buzz at Rosetta Code
- Euler's FizzBuzz, an unorthodox programmatic solution making use of Euler's theorem
- Enterprise FizzBuzz, Comical 'enterprise' implementation of FizzBuzz with intentional verbosity