Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fizz_buzz(x):
- by3 = x % 3 == 0
- by5 = x % 5 == 0
- if by3 and by5:
- return 'FizzBuzz'
- elif by3:
- return 'Fizz'
- elif by5:
- return 'Buzz'
- else:
- return x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement