This week's challenge comes from listener David Dickerson, of Tucson, Arizona. The city UTICA, NEW YORK, when spelled out, contains 12 letters, all of them different. Think of a well-known U.S. city, that when its name is spelled out, contains 13 letters, all of them different. Your answer doesn't have to match mine.
Immediately we can tell that this is going to be an easy one with minimal NLP or linguistics, and not a lot of tools required. Here's what we need:
- C: a long list of cities (and their states) in the US
- Easy--we can reuse the list of places (plus their states) in the US that we prepared for the puzzle two weeks ago
- Note that our list includes non-city places-- counties, streets, parks, etc., but that's okay.
- f: a function to check whether the city+state contains 13 unique letters (i.e., 13 types)
- this is an easy job for python
We need a python script that can do a bit of cleanup on place names-- lowercase everything (so "a" and "A" are counted as one letter type and not two), remove punctuation, etc. Then we simply check if the original length of the word and the count of unique letters in the word are the same.
My script is producing 38 solutions, although only one or two of them are "well-known". Good luck! I'll be back to share my solution after the Thursday NPR submission deadline.
Update & Solution
The deadline for submissions has passed, so click below if you want to see my answer. See you next week!
No comments:
Post a Comment