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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started