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, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
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
Mathematics, 29.01.2020 16:43
question
Business, 29.01.2020 16:43
Questions on the website: 13722362