please code in python regular expression In some web forms, users must enter a phone number, and some of these aggravate users by accepting only a specific format. You have been hired to write a program that reads U.S. phone numbers with the three-digit area and seven-digit local codes accepted as ten digits, or separated into blocks using hyphens or spaces, and with the area code optionally enclosed in parentheses. For example, all of these are valid: 555-123-1234, (555) 1234567, (555) 123 1234, and 5551234567. Read the phone numbers from user input and for each one echo the number in the form “(999) 999 9999” or report an error for any that are invalid, or that don’t have exactly ten digits.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
please code in python regular expression
In some web forms, users must enter a phone number, and some of these aggravate users by
accepting only a specific format. You have been hired to write a program that reads U.S. phone
numbers with the three-digit area and seven-digit local codes accepted as ten digits, or separated
into blocks using hyphens or spaces, and with the area code optionally enclosed in parentheses.
For example, all of these are valid: 555-123-1234, (555) 1234567, (555) 123 1234, and
5551234567. Read the phone numbers from user input and for each one echo the number in the
form “(999) 999 9999” or report an error for any that are invalid, or that don’t have exactly ten
digits.

Step by step
Solved in 3 steps with 1 images









