Answered You can buy a ready-made answer or pick a professional tutor to order an original one.

QUESTION

write two functions use python is_phone_num: This Boolean function takes a string and returns True if it is in the format ddd- ddd-dddd,where d is adigit,False otherwise. Examplecalls: is_phone_num('1

write two functions use python is_phone_num: This Boolean function takes a string and returns True if it is in the format ddd- ddd-dddd,where d is adigit,False otherwise. Examplecalls: is_phone_num('123-456-7890') --> True is_phone_num('123-4556-7890') --> False is_phone_num('(123)456-7890') --> False redact_line: This function takes a string and returns a new string that has all of the phone numbers (as defined in the previous function description) in the original string replaced by 'XXX-XXX-XXXX'. Assume that the argument ends in a newline. Phone numbers are bracketed by spaces, newlines, and/or the beginning of the string. example:redact_line('123-456-7890\n') --> 'XXX-XXX-XXXX\n' redact_line('123-456-7890 123-456-78901 123-456-7890\n') --> 'XXX-XXX-XXXX 123-456-78901 XXX-XXX-XXXX\n' biggest: This function returns the largest value in its sole argument, a nonempty matrix.

Show more
adelen
adelen
  • @
  • 1 order completed
ANSWER

Tutor has posted answer for $25.00. See answer's preview

$25.00

********* is *** which ****** *** desired ****** * **** added explanation *** **** line ** the ********** ******** ****** ** number ** ***** ***** numberdef is_phone_num(number): ** *********** != *** #checks if ****** is ** ****** ***** for * ** ********** if * in ***** ** number[i] ** **** ******* ** ********* ** * and 7 ** * ****** ***** elif *** ******************* ******* ** other characters *** ******* return ***** ****** ******* ************************** outputString = ** numberstring * ***************** * remove ******* character **** *** **** = ******************* ****** ****** **** * list for temp ** ***** ****** *** **** **** ** *** **** ** ******************* ****** if ** is ***** ****** ************************* * * * * ************** *** yes ******* ** with * ** output ****** ***** ************************* + " * + **** ***** ****** **** ****** ** output string ******************************* **** ******* ********* back to string ******************* #print *** ****** ******

Click here to download attached files: answer.docx
or Buy custom answer
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question