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, 21.06.2019 19:30
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname,firstname with no spaces in it) or a name (lastname,firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none.txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
question
Computers and Technology, 21.06.2019 22:00
You should try to photograph people on bright sunny days because the light will be best a) true b) false
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people,and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
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
Mathematics, 07.12.2021 23:10
question
English, 07.12.2021 23:10
question
Mathematics, 07.12.2021 23:10
question
Mathematics, 07.12.2021 23:10
question
Mathematics, 07.12.2021 23:10
Questions on the website: 13722367