Question: I need help with this problem for my computer science hw. The program we are using is Python 3. The program we are supposed to
I need help with this problem for my computer science hw.
The program we are using is Python 3.
The program we are supposed to write is: phone numbers in the United States consist of 10 digits, sometimes formatted with punctuation and spaces. Write a program that prompts for a phone number and determines whether or not it is a valid 10-digit number by ignoring any punctuation. Do this by writing a function that takes the phone number string as a parameter and returns True if it is valid, False if not. (Hint: use a for loop to iterate over the string and increment a counter whenever you see a digit.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
