Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program that will: (Do not use conditional statements like if): e.g: 1. A phone number can be entered in to a system

Write a Python program that will: (Do not use conditional statements like if):

 

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

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Answer Here is the code for the given problem is that mobilenumber inputEnter Mobile Number Replace ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions