subject

Overview Create a program that will use functions to break down a 10-digit phone number. Objectives To get experience manipulating strings To get experience defining a function To get experience calling the function with user supplied arguments To get experience using the return value of the function Description Refer back to your lab 6C where you were able to accept input representing a 10-digit phone number and generate an output with the area code, sourrounded by parentheses, then a space, then the prefix, and line number, separated by hyphens. For this lab, you will use the following functions to accomplish the same formatted output, given the same 10-digit input: get_area_code(ten_digit_number) -- which will return the area code only, no space or parentheses get_prefix(ten_digit_number) -- which will return the prefix only, no space or hyphen get_line_number(ten_digit_number) -- which will return the line number only, no space or hyphen Example of the program The following program reads 10 digits as a phone number and generates a formatted output. For example if the user enters: 8772692967, then the output will be: (877) 269-2967 Please enter 10 digits: 8005551212 Here is your formatted phone number: (800) 555-1212 LAB

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
When building customer relationships through email what should you not do? question 2 options: utilize proper grammar, spelling, and punctuation type in all capital letters use hyperlinks rather than attachments respond to all emails within 24 hours
Answers: 1
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 24.06.2019 18:20
Use a while-end loop in a script file to calculate the sum of the first n terms of the series: summation sign on the top n bottom k=1 : )^k * k^2 +5k)/3^k show the script file and the two results of n = 10 and n = 20.
Answers: 2
question
Computers and Technology, 24.06.2019 21:40
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
You know the right answer?
Overview Create a program that will use functions to break down a 10-digit phone number. Objectives...
Questions
question
Mathematics, 01.09.2020 01:01
Questions on the website: 13722365