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)~...
-
A particle moves along the spiral shown. Determine the magnitude of the velocity of the particle in terms of b, , and d . r=he F 0
-
Consider the following pseudocode: procedure P(A, B : real) X : real procedure Q(B, C : real) Y : real . . . procedure R(A, C : real) Z : real . . . (*) . . . Assuming static scope, what is the...
-
Describe which characteristics of HR metrics and workforce analytics are likely to result in greater return on investment and organizational impact.
-
Bill and Kate Theil are not only husband and wife but entrepreneurs who have established three successful businesses. The proposed plan for their latest effort involves a series of international...
-
Find the derivative of the function. 54 s(t) = 47 (5t-9)
-
Q1 JE # 1 JE # 2 JE # 3 JE # 4 Business Insurance Annual Expense Coverage Period Here is the billing schedule of the insurance carrier. Invoice Schedule Invoice Amount Installment 1 Installment 2...
-
Imagine you have identified bruising to the arm of one of your clients. Give three different possible organisational methods for dealing with this situation.
-
Briefly describe any FOUR advantages of using comments in a program.
-
Suppose that the supply curve of serving in the military is S(P) = P, where Q = S(P) is several hours employed in military service a day. There are only mercenaries in the army (there is no draft). P...
-
Two resultant forces 100kN and Q kN acting at a point at an angle 90 between them. If resultant force is 200kN, find value of Q. Also find angle made by resultant with 100kN force?
-
Name four characteristics of Force?
-
Find the derivative of the function f(x) = {3x^2 + 2x - 5}/{x^2 +1}
-
(a) What is the angular speed (in rpm) with which the Earth spins on its axis? 1 (b) What is the angular speed (in rpm) with which the Earth revolves around the Sun? Assume that the path is circular....
-
The following selected accounts and normal balances existed at year-end. Notice that expenses exceed revenue in this period. Make the four journal entries required to close the books: Accounts...
-
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)...
-
Use equation (17.2) to establish the following distributional relationships that are helpful for calculating quantiles. a. Assume that \(y_{0}=\alpha_{1} F / \alpha_{2}\), where \(F\) has an...
-
Assume that \(y\) is normally distributed with mean \(\mu\) and variance \(\sigma^{2}\). Let \(\phi(\cdot)\) and \(\Phi(\cdot)\) be the standard normal density and distribution functions,...
-
Consider a GB2 probability density function given in equation (17.3). a. Reparameterize the distribution by defining the new parameter \(\theta=e^{\mu}\). Show that the density can be expressed as...
Study smarter with the SolutionInn App