Chooses “a” or “an” before a word by inspecting its first character: vowel starts receive “an”; other starts receive “a.” section 2.0 section 2.1.11
Implement the rule incrementally:
- Index the word with word[0], normalize it with lower(), and test membership in 'aeiou'. section 2.1.13 section 2.3.3
- Use an if expression to select both possible outcomes: article = 'an' if word[0].lower() in 'aeiou' else 'a'. section 2.1.11 section 2.3.3
- Insert the selected article into a formatted output string and verify changes with pytest or make test. section 2.1.13
Command-line output
Running crowsnest.py with narwhal produces “Ahoy, Captain, a narwhal off the larboard bow!”; octopus produces “Ahoy, Captain, an octopus off the larboard bow!” section 2.0
Use the lookout scenario to connect the article choice with a concrete spoken alert. section 2.0

