Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution(N):
- for i in range(1, N+1):
- text = ''
- if i%3 == 0:
- text += "Fizz"
- if i%5 == 0:
- text += "Buzz"
- if i%7 == 0:
- text += "Woof"
- if text == '':
- text = i
- print(text)
- # --- tests ---
- solution(3*5*7)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement