Skip to content

Instantly share code, notes, and snippets.

@biglovisa
Created April 24, 2017 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biglovisa/dedf53076576bbe7335ea2b359968dc7 to your computer and use it in GitHub Desktop.
Save biglovisa/dedf53076576bbe7335ea2b359968dc7 to your computer and use it in GitHub Desktop.
superfizz

Superfizz

Iteration 1

  • Print all numbers 1-10 to the screen.

Iteration 2

  • Print all numbers 1-10 to the screen.
  • For multiples of 3, print "Fizz" instead of the number

Iteration 3

  • Print all numbers 1-10 to the screen.
  • For multiples of 3, print "Fizz" instead of the number
  • For multiples of 5, print "Buzz" instead of the number

Iteration 4

  • Print all numbers 1-10 to the screen.
  • For multiples of 3, print "Fizz" instead of the number
  • For multiples of 5, print "Buzz" instead of the number
  • For multiples of 3 and 5, print "FizzBuzz" instead of the number

Iteration 5

  • Create a function which takes the argument max
  • Print all numbers 1-max (the argument passed in) to the screen
  • For multiples of 3, print "Fizz" instead of the number
  • For multiples of 5, print "Buzz" instead of the number
  • For multiples of 3 and 5, print "FizzBuzz" instead of the number

Iteration 6

  • Create a function which takes the argument min and max
  • Print all numbers min-max (the arguments passed in) to the screen
  • For multiples of 3, print "Fizz" instead of the number
  • For multiples of 5, print "Buzz" instead of the number
  • For multiples of 3 and 5, print "FizzBuzz" instead of the number

Iteration 7

  • Create a function which takes the argument min and max
  • The function can also take the arguments num1 and num2
  • Print all numbers min-max (the arguments passed in) to the screen
  • For multiples of num1, print "Fizz" instead of the number
  • For multiples of num2, print "Buzz" instead of the number
  • For multiples of num1 and num2, print "FizzBuzz" instead of the number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment