subject

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()

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:50
3.2.5 suppose that we have an estimate ahead of time of how often search keys are to be accessed in a bst, and the freedom to insert items in any order that we desire. should the keys be inserted into the tree in increasing order, decreasing order of likely frequency of access, or some other order? explain your answer.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Create a string list. 2. use console.readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value.tochararray(); if (array.length > = 1) { if (char.islower(array[0])) { array[0] = char.toupper(array[0]); } } for (int i = 1; i < array.length; i++) { if (array[i - 1] == ' ') { if (char.islower(array[i])) { array[i] = char.toupper(array[i]); } } } return new string(array);
Answers: 3
You know the right answer?
Write a program that asks the user to enter a 10 character telephone number in the format xxx-xxx-....
Questions
question
Geography, 26.06.2021 15:30
question
English, 26.06.2021 15:40
question
Social Studies, 26.06.2021 15:50
question
Mathematics, 26.06.2021 15:50
Questions on the website: 13722361