Sha256: 029f6e071decff33b8349036a3cd6843254886a669c0fc7630c5a051786e19e6
Contents?: true
Size: 482 Bytes
Versions: 396
Compression:
Stored size: 482 Bytes
Contents
def _is_pling(number): return number % 3 == 0 def _is_plang(number): return number % 5 == 0 def _is_plong(number): return number % 7 == 0 def _drops_for(number): drops = [] if _is_pling(number): drops.append('Pling') if _is_plang(number): drops.append('Plang') if _is_plong(number): drops.append('Plong') return drops def raindrops(number): drops = _drops_for(number) return ''.join(drops) or str(number)
Version data entries
396 entries across 396 versions & 1 rubygems