Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

on Phyton 3.6.2 On a standard telephone, alphabetic letters are mapped to numbers in the following fashion: A, B, and C=2 D, E, and F

on Phyton 3.6.2

image text in transcribed

On a standard telephone, alphabetic letters are mapped to numbers in the following fashion: A, B, and C=2 D, E, and F 3 G, H, and 1-4 J, K, and L-5 M, N, andO 6 P,Q,and R = 7 T, U, and V 8 W,X,Y, and Z 9 Write a fruitful function that takes any string of alphanumeric characters and returns a string with all alphabetic characters in the argument translated into their numeric equivalent, using the above mapping. (6 points) Many companies use telephone numbers like 713-GET-FOOD to make it easier for their customers to remember. But for customers, it is easier to dial a pure numeric phone number, rather than an alphanumeric number. Write an application program that asks the user to enter a 10 character alphanumeric telephone number in the form of XXX-XXX-XXXX. The application should then call your function to translate the alphanumeric phone number into its equivalent numeric phone number and display the result. For example, if the user enters 713-GET-FOOD the application should display 713-438-3663. The application should allow the user to continue translating phone numbers until she/he decides to stop. Use meaningful variable names. (6 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions