This week's challenge comes from listener Samuel Mace of Smyrna, Del. Name a famous actor whose first name is a book of the Bible and whose last name is an anagram of another book of the Bible. Who is it?
Great, we know how to handle this kind of puzzle!
Note one possible pitfall before we jump in: actor. This sometimes refers to men only (as opposed to actresses), but these days it is often used to include men and women. Let's use the less restrictive definition here. We know what can happen when we make assumptions about the puzzle.
Okay, to solve this we need:
- Lists:
- A: a list of actors;
- open list; I'm using this list of 1000;
- B: a list of books of the Bible;
- closed list; I'm using this list from the standard King James Version; we could of course expand this by looking at other versions;
- N: a subset of B, where all items are personal names;
- Function:
- is_anagram(x, y)
- remove nonletters ("O'Neal" --> "ONeal")
- lowercase ("ONeal" --> "oneal")
- sort letters ("oneal" --> "aelno")
- compare x, y
- return True or False
Think you can handle it? I'll see you back here Friday with my solution!
--Levi