Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fb(n):
- if n % 5 == 0 and n % 3 == 0:
- return "FizzBuzz"
- elif n % 3 == 0:
- return "Fizz"
- elif n % 5 == 0:
- return "Buzz"
- else:
- return " "
- i=1
- while i <= 20:
- print(i, fb(i))
- i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement