Question: 2. a. Write a function that takes a phone number as input and returns a string of the form: (areacode) officecode-linenumber (e.g., if input areacode

 2. a. Write a function that takes a phone number as

2. a. Write a function that takes a phone number as input and returns a string of the form: (areacode) officecode-linenumber (e.g., if input areacode is 518, office code is 454 and linenumber is 2105 then output should be: (518) 454-2105) b. Test your function by printing out all the rows of the directory table with phone numbers formatted nicely using your function. 2. a. Write a function that takes a phone number as input and returns a string of the form: (areacode) officecode-linenumber (e.g., if input areacode is 518, office code is 454 and linenumber is 2105 then output should be: (518) 454-2105) b. Test your function by printing out all the rows of the directory table with phone numbers formatted nicely using your function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!