Is the Phone Number Formatted Correctly?
Create a function that accepts a string and returns true if it’s in the format of a proper phone number and false if it’s not. Assume any number between 0-9 (in the appropriate spots) will produce a valid phone number.
This is what a valid phone number looks like:
<br>(123) 456-7890<br>
Examples
<br>isValidPhoneNumber("(123) 456-7890")<br>output = True<br><br>isValidPhoneNumber("1111)555 2345")<br>output = False<br><br>isValidPhoneNumber("098) 123 4567")<br>output = False<br>
Notes
Don’t forget the space after the closing parenthesis.