Question: python code 100 4gh 7 pors Enter word: GROK 4765 2abc 5 Type here to search 8 tu 0- 3 de 6m 9 w Image








100 4gh 7 pors Enter word: GROK 4765 2abc 5 Type here to search 8 tu 0- 3 de 6m 9 w Image source Given a word of input, all in uppercase letters, print the numbers you would need to type on a standard mobile phone keypad to enter that word. Assume that the phone can perfectly predict the word you want, and there are no numbers or punctuation symbols the word. For example: D# 4765 is printed out since GROK is entered by pressing 4, 7. 6. and 5. 1. Write A Pr... program.py > 1 # A dictionary containing the letter to digit phone keypad mappings. 2 KEYPAD= { 3 Grek 12-D 4 5 6 7 8 9} 18 11 12 13 'A': '2', 'B': '2', 'C': '2', 'D': '3', 'E': '3', 'F': '3', 'G': '4', 'H': '4', 'I': '4', '3': '5', "K': '5', 'L': '5', 'M': '6', 'N': '6', '0': '6', 'P': '7', 'Q': '7', 'R': '7', 'S': '7', 'T': '8', 'U': '8', 'V': '8', 'W': '9', 'X': '9', y': '9', 121: 19, word input ("Enter word: ') for key in word: print (KEYPAD [key], end='') Submissions Downloads >> Output Your battery A Run Terminal Res < > Resume up... 2:51 PM
Step by Step Solution
3.45 Rating (174 Votes )
There are 3 Steps involved in it
It appears that you are trying to write a program in Ruby to ... View full answer
Get step-by-step solutions from verified subject matter experts
