Skip to content

Instantly share code, notes, and snippets.

@sdecandelario
Last active February 7, 2017 21:27
Show Gist options
  • Save sdecandelario/11d4f53c14efa3a2c753e39c59a3d7a5 to your computer and use it in GitHub Desktop.
Save sdecandelario/11d4f53c14efa3a2c753e39c59a3d7a5 to your computer and use it in GitHub Desktop.
FizzBuzz extended kata

FizzBuzz extended kata

Introduction

The objective of the kata consists what, when a number is passed return a string if is dividible by another number

1st step

There are some rules:

  • Normal number return the same number
  • Numbers divisible by 3 return fizz
  • Numbers divisible by 5 return buzz

2nd step

  • Numbers divisible by 7 return pop
  • Numbers divisible by 2 return fuzz

3rd step

  • You can define any rule you want, for example: numbers divisible by 4 return pep or whatever you want

Clarification

If a number is divisible for various number, then return all the strings of all the numbers, for example the number 14 return fuzz pop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment