Question: Python help 5.12 (Telephone Number Word Generator) You should find this exercise to be enter- taining. Standard telephone keypads contain the digits zero through nine.
Python help
5.12 (Telephone Number Word Generator) You should find this exercise to be enter- taining. Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them, as shown in the following table: Digit Letters Digit Letters Digit Letters 2 A B C DEF 5 6 7 JKL MNO PRS 8 9 WXY Many people find it difficult to memorize phone numbers, so they use the corre- spondence between digits and letters to develop seven-letter words (or phrases) that corre- spond to their phone numbers. For example, a person whose telephone number is 686- 2377 might use the correspondence indicated in the preceding table to develop the seven- letter word "NUMBERS." Every seven-letter word or phrase corresponds to exactly one seven-digit telephone number. A budding data science entrepreneur might like to reserve the phone number 244-3282 ("BIGDATA"). Every seven-digit phone number without Os or is corresponds to many different seven-letter words, but most of these words represent unrecognizable gibberish. A veteri- narian with the phone number 738-2273 would be pleased to know that the number cor- responds to the letters "PETCARE. Write a script that, given a seven-digit number, generates every possible seven-letter word combination corresponding to that number. There are 2,187 (37) such combina- tions. Avoid phone numbers with the digits 0 and 1 (to which no letters correspond). See if your phone number corresponds to meaningful words
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
