python code 100 4gh 7 pors Enter word: GROK 4765 2abc 5 Type here to search 8
Fantastic news! We've Found the answer you've been seeking!
Question:
python code
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
It appears that you are trying to write a program in Ruby to ... View the full answer
Related Book For
Project Management The Managerial Process
ISBN: 9781260570434
8th Edition
Authors: Eric W Larson, Clifford F. Gray
Posted Date:
Students also viewed these programming questions
-
This code must be Written in Python Programming Language. I have attached all of the information that I was provided for this question. if you could assist at all it would be greatly appreciated....
-
I could not find the working python code to implement the below case, kindly look up and assist. I am looking to import 2 CSV files (Background data & data2) in python, and proceed to subtract...
-
This Python code copies a file, line by line. It presumes thatthe input and output files will be in the same directory (folder)as the code itself. infile_name = input("Please enter the name of the...
-
You have obtained the following share prices from Yahoo Finance. Company 1 is listed on the London Stock Exchange. You want to estimate the beta value for Company 1. You run a regression of the share...
-
Mackelprang Inc. is in the initial stages of building the premier planned community in the greater Phoenix, Arizona, metropolitan area. The main selling point will be the communitys lush golf...
-
From the U.K. private sector housing starts (X) for the period 1948 to 1984, Terence Mills obtained the following regression results: The 5 percent critical Ï value is 2.95 and the 10 percent...
-
Vince Smith opened a law office on March 2, 2010. During the first month of operations, the business completed the following transactions: Requirements 1. Open the following T-accounts: Cash,...
-
Bristol Manufacturing, Inc., uses the job order cost system of accounting. The following information was taken from the company's books after all posting had been completed at the end of May: a....
-
The role of capital markets is paramount in the global economy, serving as the nexus where entities raise funds by issuing securities and investors allocate capital to various investment...
-
a. Prepare a UML class diagram that captures Rubber Duck's brewing process. b. Using the preceding information and the following attributes list, prepare a listing of the relational tables,...
-
Mr. Bhatt is 50 and has vast experience in the pharmaceutical industry. A newly established pharmaceutical company producing medicines based on biotechnology employed Mr. Bhatt as its Product...
-
Differentiate between financial and operational auditing.
-
How do government auditing standards differ from generally accepted auditing standards?
-
How may the typical approach the auditor should take toward management's assertions be characterized? Explain.
-
Identify four important groups related to a client with whom the auditor may maintain professional relationships.
-
What specific requirements applicable to major programs are tested for compliance in a single audit?
-
Submit a Reflective Essay on what they see as the role of Academic Integrity at Wentworth Institute for Higher Education (WIN). What thoughts and feelings do you have about the importance of academic...
-
What is beacon marketing? What are digital wallets?
-
What options did Habitat for Humanity(H4H) use to complete the house so quickly?
-
Do you agree with Ron Parkers statement To be successful, you must also be willing to run at problems/opportunities when everyone else is running away from them?
-
Why is it important that final activities not be open-ended?
-
Apachi Company ended its fiscal year on July 31, 2008. The companys adjusted trial balance as of the end of its fiscal year is as shown. Instructions (a) Prepare the closing entries using page J15....
-
The following items were taken from the financial statements of R. Stevens Company. (All dollars are in thousands.) Instructions Prepare a classified balance sheet in good form as of December 31,...
-
The adjusted trial balance for Karr Bowling Alley at December 31, 2008, contains the following accounts. Instructions (a) Prepare a classified balance sheet; assume that $13,900 of the note payable...
Study smarter with the SolutionInn App