Computers and Technology

Write a program that asks the user to enter a 10 character telephone number in the format xxx-xxx-. the application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. for example, if the user enters 555-get-food the application should display 555-438-3663.

def main():
#character string
numeric_phone=" "

#user inputs phone number
alpha_phone = input('enter 10-digit phone number: ')

digit_list = ["2", "3","4", "5", "6", "7", "8", "9", "0"]

for ch in alpha_phone:
if ch. isalpha():
ch = ch is upper()

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 13:30, ashleypere99
Jane’s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
image
Computers and Technology, 22.06.2019 20:50, ashiteru123
What is the difference between windows 7 and windows 10?
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
image
Computers and Technology, 23.06.2019 22:20, andrew412603
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
Do you know the correct answer?
Write a program that asks the user to enter a 10 character telephone number in the format xxx-xxx-....

Questions in other subjects:

Konu
Mathematics, 23.10.2020 01:01
Konu
Mathematics, 23.10.2020 01:01