Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fizz buzz

for i in range(1, 101):
    if i % 3 == 0 and i % 5 == 0:
        i = "FizzBuzz"
    elif i % 3 == 0:
        i = "Fizz"
    elif i % 5 == 0:
        i = "Buzz"
    print (i)
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #fizz #buzz
ADD COMMENT
Topic
Name
5+5 =