Facebook
From Rafał Senior Python DeveloperRC8, 5 Months ago, written in Python.
Embed
Download Paste or View Raw
Hits: 146
  1. print("Podaj liczbÄ™: ")
  2. i = int(input())
  3. li = []
  4.  
  5. for i in range(1, i + 1):
  6.     if i % 15 == 0:
  7.         li.append('FizzBuzz')
  8.     elif i % 5 == 0:
  9.         li.append('Buzz')
  10.     elif i % 3 == 0:
  11.         li.append('Fizz')
  12.     else:
  13.         li.append(i)
  14.  
  15. for i in li:
  16.     print(i)
  17.