Week 1

Deep Thought

Compare text, ignoring how it is capitalized and whether a space or a hyphen sits in the middle.

You type

An answer to one famous question.

The tool
One question, two outcomes Read the answer Does it match? Yes or no
What comes out

A yes or a no.

The question, more slowly

The question is: ask for the answer to the great question, and print yes only for the famous answer. A few spellings count: digits, words, a space, or a hyphen. Capitalization does not matter. Extra spaces at the ends do not matter. Anything else is no.

You are comparing text to text. You do not need to turn the digits into an integer if you compare them as a string. Normalize the line first, then ask whether it is one of the allowed spellings.

People accept only the digits, or they treat a space and a hyphen as different answers when the spec says both count. Also try the famous answer with a capital letter.

Before you code

List, in your own words, the spellings that should count as the famous answer. The spec has the list.