** it should iterate until that number and follow the condition, and I don't want it to return None for the 16th iteration**
def fizzbizz(number):
for i in range(1,number + 1):
if i % 3 == 0 and i % 5 == 0:
print("fizzBuzz")
elif i % 3 == 0 and i % 5 != 0:
print("fizz")
elif i % 3 != 0 and i % 5 == 0:
print("Buzz")
else:
print(str(i))
if __name__ == '__main__':
print(fizzbizz(15))
output is :
1
2
fizz
4
Buzz
fizz
7
8
fizz
Buzz
11
fizz
13
14
fizzBuzz
None