Phonetic Alphabet

You might already be familiar with the phonetic alphabet - Alpha for A, Bravo for B, Charlie for C, etc. - it's used by the police, military, pilots, etc., where people need to be clear and want to avoid mistakes. By using words associated with each letter, it's easier to distinguish between letters that sound similar - e.g. m and n, or b, v and p - and therefore reduce the rate of errors. It also helps in international situations where the names for letters are different in different languages.

How Will It Work?

If you aren't familiar with the phonetic alphabet, or would like to check spellings, etc., have a look at the Phonetic Alphabet Wikipedia page.

Now you're getting better at programming, I'm going to give you less help. I will tell you, though, that I would use at least one array, list or tuple to store the names of the letters, and you might find the ord() command useful, as well as possibly upper() or lower().

Your Task

Your task is to ask the user for a work or phrase and spell it out using the phonetic alphabet - e.g. if I input Andrew, it should output Alpha November Delta Romeo Echo Whisky. Your program should:

  1. look up the phonetic name for each letter

  2. cope with upper and lower case letters

  3. cope with non-alphabetic characters (e.g. by ignoring them, or just printing them as they are)

Start with the first point and do as many of the points as you are comfortable with. Don't forget to make your program easy to use and to give clear instructions to the user about what they need to do.