Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fizz buzz in python

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)
 
PREVIOUS NEXT
Tagged: #fizz #buzz #python
ADD COMMENT
Topic
Name
8+1 =