Write a Python program that will: (Do not use conditional statements like if): e.g: 1. A phone
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Python program that will: (Do not use conditional statements like if):
Transcribed Image Text:
e.g: 1. A phone number can be entered in to a system using the below formats 709-731-8999 709 731 8999 709/731/8999 (709) (731)-(8999) (709) (731) (8999) (709)/(731)/(8999) 3. Using string methods convert any of the above phone numbers to e.g.: 709.731.8999 (with dots) and display. 4. Then replace all 9's by zeros and display e.g.: 700.731.8000 5. Repeat the middle number section again. e.g.: 700.731.731.800 6. Then add all digits together, get the total of digits and display the result 7. Display with formatting as shown in sample run below Enter Phone Number: (709)-(731)-(8999) 1. Formatted Phone Number is: 2. Replaced 9s with 0's: 3. Add repeating middle section: 4. Summation is: 709.731.8999 700.731.8000 700.731.731.8000 37.0 e.g: 1. A phone number can be entered in to a system using the below formats 709-731-8999 709 731 8999 709/731/8999 (709) (731)-(8999) (709) (731) (8999) (709)/(731)/(8999) 3. Using string methods convert any of the above phone numbers to e.g.: 709.731.8999 (with dots) and display. 4. Then replace all 9's by zeros and display e.g.: 700.731.8000 5. Repeat the middle number section again. e.g.: 700.731.731.800 6. Then add all digits together, get the total of digits and display the result 7. Display with formatting as shown in sample run below Enter Phone Number: (709)-(731)-(8999) 1. Formatted Phone Number is: 2. Replaced 9s with 0's: 3. Add repeating middle section: 4. Summation is: 709.731.8999 700.731.8000 700.731.731.8000 37.0
Expert Answer:
Answer rating: 100% (QA)
Answer Here is the code for the given problem is that mobilenumber inputEnter Mobile Number Replace ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Can you give me an example of a company that used environmental factors to their advantage?
-
What would you suggest to be done and which principles are important to you in this decision? How would you think about the greatest good in this case? As a leader what are your duties and who are...
-
A carousel is in a park. The center of the carousel is 60 feet due south of the entrance to the park. The carousel has a diameter of 28 feet and takes 14 seconds to complete one counterclockwise...
-
Given that log (2) 0.91 and log (5) 2.1, evaluate each of the following. Hint: use the properties of logarithms to rewrite the given logarithm in terms of the the logarithms of 2 and 5. a) log(0.4)~...
-
In the scenario of the previous question, is H1: 1 = 2, 2 = 1, 3 = 1, 4 = 3, 5 = 0 an admissible alternative hypothesis?
-
A steelmaking plant pollutes the air and water so __________. A. The marginal social cost of producing steel exceeds the marginal private cost by the amount of the marginal external cost. B. The...
-
On January 1,2009, Allan Company bought a 15 percent interest in Sysinger Company. The acqui sition price of $184,500 reflected an assessment that all of Sysingers accounts were fairly valued within...
-
Walshs Juice Company produces three products from unprocessed grape juicebottled juice, frozen juice concentrate, and jelly. It purchases grape juice from three vineyards near the Great Lakes. The...
-
The following information pertains to Blue Spruce Corp.. The following information pertains to Blue Spruce Corp 1. 2. 3. 4 Cash balance per bank, July 31, $9,503. July bank service charge not...
-
On the geologic map in Fig. G-1 (Appendix G) draw the correct strike and dip symbol in each circle to indicate the attitude of Formation B and each dike. To verify your attitude symbols, Fig. G-2 can...
-
1. Write out the code for a ggplot that would give a histogram of a log10 transform of BasalMetRate_mLO2hr. Show the plots for the raw data and the transformed data and briefly describe the...
-
According to the College Board website, the scores on the math part of the SAT (SAT-M) in a certain year had a mean of 507 and a standard deviation of 111. Assume that SAT scores follow a normal...
-
Pay and incentive programs are being used both for knowledge workers and in non-knowledge worker occupations. In every industry, from restaurants to construction and low-tech manufacturing, companies...
-
Closet International invested in an equipment in 2019 with an initial cost of $598,000. It falls under asset class 8 with a CCA rate of 20%. The equipment was sold in 2021 for $260,000. Calculate the...
-
Question 4 (30 Marks) A 12-ply Kevlar/Epoxy composite beam with layup [0/90 / 0 1s is loaded in 3-point bending, as shown in Figure Q4. The beam has a length, L of 100mm, a width, b of 25mm and a...
-
Scenario: You have been working in a community service sector for two years. However, you always find evaluating your own performance challenging. Your Supervisor has also identified that you do not...
-
Sonic needs to purchase equipment for its drive-ins nationwide. The total cost of the equipment is $2 million. It is estimated that the after-tax cash inflows from the project will be $210,000...
-
The liquidliquid extractor in Figure 8.1 operates at 100F and a nominal pressure of 15 psia. For the feed and solvent flows shown, determine the number of equilibrium stages to extract 99.5% of the...
-
Leslie is a single taxpayer who is under age 65 and in good health. For 2012, she has a salary of $23,000 and itemized deductions of $1,000. Leslie is entitled to one exemption on her tax return. a....
-
In 2012, Lou has a salary of $54,000 from her job. She also has interest income of $1,700. Lou is single and has no dependents. During the year, Lou sold silver coins held as an investment for a...
-
Jerry made the following contributions during 2012: His synagogue (by check).....................................................$680 The Democratic Party (by check)...
-
Cisco Systems, Inc. (CSCO), manufactures and sells networking and communications equipment for transporting data, voice, and video and provides services related to that equipment. Its products...
-
By any stretch of the imagination, Cisco Systems (CSCO) has been a strong growth company. A darling of the Internet boom of the late 1990s, it was one of the few technol- ogy companies tied to the...
-
E14.14. Valuation Grid and Reverse Engineering for Home Depot, Inc. (Medium) 2. Using the information in Exercise 14.13, calculate the implied growth rate in residual operating income that is...
Study smarter with the SolutionInn App