Question: 1. 2. 3. 4. D. Reverse Phone Spelling Program (adaped from Dierbach, problem DI, p361) Write a Python program that allows a user to enter
1.
2.
3.
4.
D. Reverse Phone Spelling Program (adaped from Dierbach, problem DI, p361) Write a Python program that allows a user to enter a phone number containing letters and outputs the corresponding numeric phone number. e.g., 764-HELP is equivalent to 764-4357 Your program must do the following: Use a Python dictionary to perform the letter-to-number conversion Input phone numbers must have either 7 or 10 "digits" (numbers or letters) and can be input in upper or lower case using any or no punctuation: e.g., '61 2.GOT#MILK. '(612) GOT MILK', '612gotMilk. and '612 GOT MILK' are all valid inputs. Validate the input to ensure it contains the correct number of "digits" Output the converted phone number using hyphen characters in one of the following forms as appropriate * Coue converting telephone numbers until the user enters a null string. Constraints Do not import/use any library modules. D. Reverse Phone Spelling Program (adaped from Dierbach, problem DI, p361) Write a Python program that allows a user to enter a phone number containing letters and outputs the corresponding numeric phone number. e.g., 764-HELP is equivalent to 764-4357 Your program must do the following: Use a Python dictionary to perform the letter-to-number conversion Input phone numbers must have either 7 or 10 "digits" (numbers or letters) and can be input in upper or lower case using any or no punctuation: e.g., '61 2.GOT#MILK. '(612) GOT MILK', '612gotMilk. and '612 GOT MILK' are all valid inputs. Validate the input to ensure it contains the correct number of "digits" Output the converted phone number using hyphen characters in one of the following forms as appropriate * Coue converting telephone numbers until the user enters a null string. Constraints Do not import/use any library modules
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
