subject
Engineering, 17.04.2021 20:30 Angel4345

Given an integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212. Ex: If the input is: 8005551212 the output is: (800) 555-1212 Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572% 100, which is 72. Hint: Use // to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 // 100, which yields 5. (Recall integer division discards the fraction). For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed. LAB ACTIVITY 3.11.1: LAB: Phone number breakdown 0/100 main. py Load default template... 1 phone_number = int(input) 3 num_one = s[:3] 4 num_two = s[3:6] 5 num_three = s[6:] 7 final_number = '('+num_one+''+num_two+'-' +num_three 8 print = final_number Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:20
Inspection for bearing condition will include: (clo4) a)-color b)-smell c)-size d)-none of the above
Answers: 1
question
Engineering, 04.07.2019 18:20
Agas mixture consists of 8 kmol of h2 and 2 kmol of n2. determine the mass of each gas and the apparent gas constant of the mixture.
Answers: 3
question
Engineering, 04.07.2019 19:20
Acircular pipe of 30mm outside diameter is placed in an airstream at 30 c and latm pressure. the air moves in cross flow over the pipe at 20 m/s, while the outer surface of the pipe is maintained at 110 c. what is the drag force exerted on the pipe per unit length? what is the rate of heat transfer from the pipe per unit length?
Answers: 1
question
Engineering, 06.07.2019 03:20
Write a technical essay (maximum two pages) about stress concentration. and paste from the textbook. instead, read updated material about this phenomenon and provide a technical evaluation of the different techniques to avoid/reduce such phenomenon. consider in your analysis cutting-edge computational techniques such as fea to study and analyze stress concentrations.
Answers: 2
You know the right answer?
Given an integer representing a 10-digit phone number, output the area code, prefix, and line number...
Questions
question
Geography, 21.11.2020 05:10
question
Arts, 21.11.2020 05:10
question
Mathematics, 21.11.2020 05:10
question
Biology, 21.11.2020 05:10
Questions on the website: 13722367