develop python program: def phoneNumber(letters): 1. Decoding Telephone Numbers (4 points) Some companies use letters to show
Question:
develop python program:
def phoneNumber(letters):
1. Decoding Telephone Numbers (4 points)
Some companies use letters to show their telephone numbers, inorder to make the numbers easier to remember. For example, thetelephone number GET-LOAN corresponds to 438-5626. Sometimes,companies might use more than 7 letters in order to make thetranslated number more meaningful (e.g., CALL-HOME for 225-5466,with the extra letters ignored).
Complete the phoneNumber() function, which takes a single stringargument that consists of at least 7 capital letters. The functionreturns a new string containing just the digits of thecorresponding telephone number. For simplicity, we will assume thatthe user input consists solely of capital letters, with no digits,symbols, lowercase letters, or spaces. Use the InternationalStandard telephone keypad () to determine the letter-digitcorrespondences for your function.
Your function should only process the first 7 letters in a givenencoded telephone number. For clarity, insert a single dashcharacter ('-') after the third digit in the translated number.HINT: Start by defining a Python dictionary that maps letters todigits (use the link above to determine which letters map to whichdigits).
HINT: use the letters as your keys, and the digits as yourdictionary values. Do not simply use a series of if statements inyour program!
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley