Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Compare with Roman solution in Clear category for Fizz Buzz by veky
from enum import Enum
class FizzBuzz(Enum):
Fizz = 3
Buzz = 5
@classmethod
def encode(cls, n):
for numeral in cls:
if not n % numeral.value:
yield numeral.name
checkio = lambda n: ' '.join(FizzBuzz.encode(n)) or str(n)
Sept. 19, 2016
Comments: