Homework Help US logo
  • My account
  • Order now
Order Now
Homework Help

Write two functions use python

1 min read
Posted on 
March 19th, 2023
Home Homework Help Write two functions use python

 

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.

Order an Essay Now & Get These Features For Free:

Turnitin Report

Formatting

Title Page

Citation

Outline

Place an Order
Share
Tweet
Share
Tweet
Calculate the price
Pages (275 words)
$0.00
Homework Help US
Company
    Legal
      How Our Service is Used:
      Homework Help US essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Homework Help US does not endorse or condone any type of plagiarism.
      Subscribe
      No Spam
          © 2023 Homework Help US. All rights reserved.
          Homework Help US will be listed as ‘Homework Help US’ on your bank statement.