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 19:10
Afoot bridge is made as a simple deck, 4 m long, with a cross section 2 m (wide) and 20 cm thick, and made of wood. the deck is supported at the two ends. the maximum load allowable on the bridge is 10 tons, provided it is uniformly distributed on the deck. to sense this load, a strain gauge is placed at the center of the bridge and its resistance is monitored. if the sensor has a nominal resistance of 350 s2 and a gauge factor of 3.6, what is the reading of the strain gauge at maximum load? the modulus of elasticity for the wood used in the construction is 10 gpa.
Answers: 2
question
Engineering, 04.07.2019 19:10
What is the major difference between thermoplastics and thermosetting plastics from the polymerization structure point of view?
Answers: 2
question
Engineering, 04.07.2019 19:20
Determine (a) the maximum thermal efficiency of reversible power cycles operating between a hot reservoir at 1000°c and a cold reservoir at 200°c and (b) the maximum cops for reversible refrigeration and heat pump cycies, respectively, between 28°c and 14°c.
Answers: 1
question
Engineering, 06.07.2019 02:30
Air (c-1.006 kj/kg.k, r-0.287 kj/kg.k) enters a nozzle steadily at 280 kpa and 77°c with a velocity of 50 m/s and exits at 85 kpa and 320 m/s. the heat losses from the nozzle to the surrounding medium at 20°c are estimated to be 3.2 kj/kg. determine (a) the exit temperature and (b) the total entropy change for this process. solve this problem using constant specific heats.
Answers: 1
You know the right answer?
Given an integer representing a 10-digit phone number, output the area code, prefix, and line number...
Questions
question
English, 17.04.2020 23:10
question
History, 17.04.2020 23:10
Questions on the website: 13722363