Monday, February 15, 2021

Actors and Books of the Bible (Preview)

It's Monday Funday, so let's check out the latest Sunday Puzzle:

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:
  • Function:
    • is_anagram(x, y)
      • remove nonletters ("O'Neal" --> "ONeal")
      • lowercase ("ONeal" --> "oneal")
      • sort letters ("oneal" --> "aelno")
      • compare x, y
      • return True or False
The process from here is pretty straightforward. We iterate through A, checking each actor's first name to see if it appears in N. If we find a match, then we take the actor's last name and iterate through B, using the anagram function to look for a match.

Think you can handle it? I'll see you back here Friday with my solution!
--Levi

No comments:

Post a Comment

Director, anagram, film award

Welcome back to Natural Language Puzzling, the blog where we use natural language processing and linguistics to solve the Sunday Puzzle from...