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
Technician a says that the radiator usually cools better if the front air dam is removed. technician b says that when a condenser has a leak it can be repaired easily with epoxy. who is correct?
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What season was better from fortnite?
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
You know the right answer?
Overview Create a program that will use functions to break down a 10-digit phone number. Objectives...
Questions
question
English, 26.08.2019 19:30
Questions on the website: 13722367