Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The international standard letter/number mapping for telephones is: {A, B, C} -> 2 {D, E, F} -> 3 {G, H, I} -> 4 {J, K,

The international standard letter/number mapping for telephones is:
{A, B, C} -> 2
{D, E, F} -> 3
{G, H, I} -> 4
{J, K, L} -> 5
{M, N, O} -> 6
{P, Q, R, S} -> 7
{T, U, V} -> 8
{W, X, Y, Z} -> 9
Using Python write a function getNumber() that takes an upper case letter and returns the number according to the international standard above.
Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (uppercase or lowercase) to a digit and leaves all other characters intact.
Here are sample runs of the program:
Enter a string: 1-800-Flowers
1 -800 -3569377
Enter a string: 1800flowers
1800356937

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

What Is acidity?

Answered: 1 week ago

Question

Explain the principles of delegation

Answered: 1 week ago

Question

State the importance of motivation

Answered: 1 week ago

Question

Discuss the various steps involved in the process of planning

Answered: 1 week ago

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

=+5 How does HRM relate to efforts to increase innovation?

Answered: 1 week ago