7 Lines to Code Fizz-Buzz Game Principle in Elixir

Malreddy Ankanna
blackode
Published in
8 min readFeb 8, 2018

--

Coding FizzBuzz Game Backend Principles

This article is all about coding the implicit conditions in FizzBuzz. This makes you to walk over lines of code that gives similar output with different syntax.

To whom ?

This is for complete beginners in Elixir. But, this gonna be more informative at the end.

What is Fizz-Buzz ?

When you google, you will find the following phrases about the FizzBuzz.

FizzBuzz is a very simple programming task, used in software developer job interviews, to determine whether the job candidate can actually write code.

Fizz buzz is a group word game for children to teach them about division. 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 if divisible by both three and five with the word FizzBuzz or else just printing the number itself.

That’s all about the FizzBuzz. Oh.. you finally know what FizzBuzz is . Keep Rocking…

What are we gonna code here?

We simply print the numbers in a range replacing them with words Fizz, Buzz, and FizzBuzz using game protocol.

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode