Create a Python 3 script file that creates afunctionthat returns theprefixof a user inputted 10 digit phone number. No need to write checks if user is inputting the correct characters. You must use thereturncommand in your function when returning the prefix value. The user should be asked for a phone number and then your function should automatically be called to display the prefix.
HINT: Phone numbers have this format: (Area Code) - (Prefix) - (line #)
Make sure to understand all of Python Lesson #4 locatedhere(Links to an external site.).
Rules for Python assignment submissions:
Submit your code as a .py file.
Your first line of code MUST be a comment with your name and the date.
You may ONLY use the functions listed in this or past assignments.
Information for any function we use can be foundhere(Links to an external site.).
This assignment includes material through Python Lesson 5 locatedhere.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here