Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Fizz buzz solution in Speedy category for Fizz Buzz by ematorose
# precondition: 0 < number ≤ 1000
def checkio(number):
fizz = number % 3 == 0
buzz = number % 5 == 0
if fizz and buzz:
return "Fizz Buzz"
if fizz:
return "Fizz"
if buzz:
return "Buzz"
return str(number)
Aug. 15, 2014