""" fizzbuzz.py Print the numbers from 1 to 100, one per line. But if the number is divisible by 3, print Fizz. If it's divisible by 5, print Buzz. If it's divisible by both, print FizzBuzz. """ factors = [3, 5] words = ['Fizz', 'Buzz'] def divisible(a, b): """ True if a is divisible by b >>> divisible(15, 5) True >>> divisible(15, 7) False """ return a % b == 0 for i in range(1, 101): if divisible(i, 3) and divisible(i, 5): print("FizzBuzz") elif divisible(i, 3): print("Fizz") elif divisible(i, 5): print("Buzz") else: print(i)