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 04:00
Which spereadsheet type will determine how well a bussiness has done over the past year
Answers: 1
question
Computers and Technology, 22.06.2019 16:00
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
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, 24.04.2020 22:03
question
Arts, 24.04.2020 22:03