Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zahl = int(input('Welcome to FizzBuzz! Please select a number between 1 and 100.'))
- print()
- for i in range(zahl):
- i += 1
- if i % 3 == 0 and i % 5 == 0:
- print('fizzbuzz')
- elif i % 3 == 0:
- print('fizz')
- elif i % 5 == 0:
- print('buzz')
- else:
- print(i)
- print('\nThank you for choosing FizzBuzz!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement