« Boston Python puzzles

Python Poetry

You find yourself in a dark, wet cave. There is a heavy door with a mushroom growing on it. (Or is that an ear?)

Nailed to the door is a poem by Emily Dickinson:

'''a narrow fellow in the grass
occasionally rides;
you may have met him, did you not,
his notice sudden is.

the grass divides as with a comb,
a spotted shaft is seen;
and then it closes at your feet
and opens further on.

he likes a boggy acre,
a floor too cool for corn.
yet when a child, and barefoot,
i more than once, at morn,

have passed, i thought, a whip-lash
unbraiding in the sun,
when, stooping to secure it,
it wrinkled, and was gone.

several of nature's people
i know, and they know me;
i feel for them a transport
of cordiality;

but never met this fellow,
attended or alone,
without a tighter breathing,
and zero at the bone.'''

Below the poem is a riddle:


And below that, a note:

# hint: 'zebra' = [1,56,7,29,42]

1) Write a program that solves the riddle.

What do you say?

2) Write a program that shows the mapping for all letters.

Which letters are available, i.e. have unique non-zero values?

3) Write a program that generates all such riddles based on this poem.

What is the longest word that is a solution to a riddle based on this poem? (useful: Words (Unix))


If you have a solution you'd like to share see the Solutions page for instructions.