Answers for "i is multiple of 3 not 5 print fizzbuzz python"

2

how to make fizzbuzz in python

for x in range(100):
  output = ""
  if x % 3 == 0:
    output += "Fizz"
  if x % 5 == 0:
    output += "Buzz"
  print(output)
Posted by: Guest on January-05-2020
1

fizzbuzz in python

def fizzBuzz(size):
    for i in range(size - (size -1), size + 1):
        localResult = "fizz" if not i % 3 else ""
        localResult = localResult + "buzz" if not i % 5 else localResult
        localResult = str(i) if localResult == "" else localResult
        print(localResult)
Posted by: Guest on August-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language