Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fizz buzz python

output = ""

for i in range(1, 101):
 
    if (i % 3 == 0):
        output += "Fizz"
    
    if (i % 5 == 0):
        output += "Buzz"
    
    elif (i % 3 != 0): 
        output += str(i)
    
    output += "
" # Add a new line at the end of the output 

print(output)   
 
PREVIOUS NEXT
Tagged: #fizz #buzz #python
ADD COMMENT
Topic
Name
8+5 =