Skip to content

petemmitchell/fizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fizzbuzz

#A FizzBuzz Playground

This was a little bit easier for me to solve than I anticipated. I remembered the assignment from F2 regarding turning arabic numerals into their roman counter-parts, and vice versa. That required using the modulo comparison operator in order to break down any given number. I used the same method here, to a small scope.

I initially worked on my own, and then compared solutions with Derek and Javier. They reminded me I needed to make this a method, not just a block of code.

I seem to have done better on this with Git.

#Advanced FizzBuzz

My Advanced FizzBuzz was helped along greatly by the resources of stack overflow teaching me about Ruby's CSV parser, and how that works in conjunction with the Hash call. After that it was simply a matter of creating a method that used the key:value pairs of the hash. I can use the modulo function as before, but rather than defining any specific number-word pairing, I can let the hash do the work. This way future changes to the values.csv apply immediately.

I also used WolframAlpha to find a number that is divisible by 13, 7, 5 & 3. That way I could print FizzBuzzCivvGrr.

About

A FizzBuzz Playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages