363 B
363 B
def fubar(n: int):
if isinstance(n, float) or n < 1:
return False
count = 1
while count <= n:
msg = count
if count % 3 == 0:
msg = "Foo"
if count % 5 == 0:
msg = "Bar"
if count % 15 == 0:
msg = "FooBar"
count += 1
print(msg, end=', ')