January 6, 2017

FizzBuzz

Diverted from my 2D platformer a bit after I got the opportunity to submit for this Uber scholarship bootcamp with Ironhack in Miami.

After a series of interviews, they finally brought the top 10% of us into their campus to take a very basic technical test in ruby. They gave a refresher on ruby before the test and then told us to code a FizzBuzz game! FizzBuzz being that great childhood number game to help kids with their math skills.

If you don't know, the "teacher" will point at every kid in the room one at a time, (the rules vary depending on what you're learning) and assign some value to Fizz (like multiples of three) and another to Buzz (like multiples of five) and thus make FizzBuzz multiples of 15!

So, [1, 2, Fizz, 4, Buzz, Fizz, 7, ..., 14, FizzBuzz]

Below is the code for that! Run it in your favorite ruby compiler and watch it go!