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

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:20, 1230bering
Select any two (2) areas of applications of chain-drive. (clo4) a)-permanent lubrication necessary b)-hydraulic forklift truck operation c)-rigging and heavy moving materials d)-relatively high maintenance costs e)-costlier than belt drives
Answers: 2
image
Engineering, 04.07.2019 18:20, luisgonz5050
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
image
Engineering, 06.07.2019 05:10, suicune19
Apipe of diameter 200 mm (constant) carrying water with an 5 mis and total head is density 1000 kg/m ) with velocity tpward slope. at a certain point, where the elevation is 5 m above a datum, the 21.5 m. a) determine the pressure of the pipe at 5m elevation. determine the pressure at elevation 10m (above same datum) if the of total head at 5m elevation.
Answers: 1
image
Engineering, 06.07.2019 05:30, pandasarecute53
There is a metal plate with thickness, thermal conductivity, density, and specific heat of 10 mm, 200 w/m.°c, 2500 kgrn3, and 900 j/kg. k, respectively. it has an initial uniform temperature of 22°c and is being heated in an oven for 2 minutes. air in the oven is maintained at 900 c with convection heat transfer coefficient of 190 w/m. k. determine the temperature of the plate when it is removed from the oven.
Answers: 3
You know the right answer?
Given an integer representing a 10-digit phone number, output the area code, prefix, and line number...

Questions in other subjects:

Konu
Arts, 17.11.2020 01:00
Konu
History, 17.11.2020 01:00
Konu
English, 17.11.2020 01:00
Konu
Mathematics, 17.11.2020 01:00
Konu
Mathematics, 17.11.2020 01:00