Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- for i in range(1, n+1):
- if i % 3 == 0 and i %5 != 0:
- print("""Fizz""",",",end=" ")
- elif i % 3 != 0 and i % 5 == 0:
- print("""Buzz""",",",end=" ")
- elif i % 3 == 0 and i % 5 == 0:
- print("""Fizz Buzz""",",",end=" ")
- else:
- print(i,",",end=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement