Sha256: 0e5c2c79cccc07194e2ba4bcc626a02bbebae88c0d65adb8dbab8b9d1a74085a

Contents?: true

Size: 840 Bytes

Versions: 314

Compression:

Stored size: 840 Bytes

Contents

parts = [('lay in', 'the house that Jack built'),
         ('ate', 'the malt'),
         ('killed', 'the rat'),
         ('worried', 'the cat'),
         ('tossed', 'the dog'),
         ('milked', 'the cow with the crumpled horn'),
         ('kissed', 'the maiden all forlorn'),
         ('married', 'the man all tattered and torn'),
         ('woke', 'the priest all shaven and shorn'),
         ('kept', 'the rooster that crowed in the morn'),
         ('belonged to', 'the farmer sowing his corn'),
         ('', 'the horse and the hound and the horn')]


def verse(n):
    v = ['This is {}'.format(parts[n][1])]
    v.extend(['that {0} {1}'.format(parts[i][0], parts[i][1])
              for i in range(n - 1, -1, -1)])
    v[-1] += '.'
    return '\n'.join(v)


def rhyme():
    return "\n\n".join(verse(n) for n in range(len(parts)))

Version data entries

314 entries across 314 versions & 1 rubygems

Version Path
trackler-2.2.1.96 tracks/python/exercises/house/example.py
trackler-2.2.1.95 tracks/python/exercises/house/example.py
trackler-2.2.1.94 tracks/python/exercises/house/example.py
trackler-2.2.1.93 tracks/python/exercises/house/example.py
trackler-2.2.1.92 tracks/python/exercises/house/example.py
trackler-2.2.1.91 tracks/python/exercises/house/example.py
trackler-2.2.1.90 tracks/python/exercises/house/example.py
trackler-2.2.1.89 tracks/python/exercises/house/example.py
trackler-2.2.1.88 tracks/python/exercises/house/example.py
trackler-2.2.1.87 tracks/python/exercises/house/example.py
trackler-2.2.1.86 tracks/python/exercises/house/example.py
trackler-2.2.1.85 tracks/python/exercises/house/example.py
trackler-2.2.1.84 tracks/python/exercises/house/example.py
trackler-2.2.1.83 tracks/python/exercises/house/example.py
trackler-2.2.1.82 tracks/python/exercises/house/example.py
trackler-2.2.1.81 tracks/python/exercises/house/example.py
trackler-2.2.1.80 tracks/python/exercises/house/example.py
trackler-2.2.1.79 tracks/python/exercises/house/example.py
trackler-2.2.1.78 tracks/python/exercises/house/example.py
trackler-2.2.1.77 tracks/python/exercises/house/example.py