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...
-
Rodney Rogers, a recent business school graduate, plans to open a wholesale dairy products firm. Rogers expects first-year sales to total $5,500,000. He desires to earn a target pretax profit of...
-
According to a nationwide survey, 60% of parents with young children condone spanking their child as a regular form of punishment (Tampa Tribune, Oct. 5, 2000). Consider a random sample of three...
-
On the Internet find the 2008 Transparency International Corruption Perception Index and determine the ranking of these countries. a. United States b. Japan c. Chad d. Iceland e. Denmark
-
Consider the following activity information and the constraint that the project must be completed in 16 weeks. In addition, activities c, f, h, and i may be crashed as follows. Assume partial...
-
Question 2 (1 point) The Black Bird Company plans an expansion. The expansion is to be financed by selling $124 million in new debt and $96 million in new common stock. The before tax required rate...
-
The famous Y. S. Chang Restaurant is open 24 hours a day. Waiters and busboys report for duty at 3 A.M., 7 A.M., 11 A.M., 3 P.M., 7 P.M., or 11 P.M., and each works an 8-hour shift. The following...
-
Sandra's Purse Boutique has the following transactions related to its top-selling Guccipurse for the month of October. Sandra's Purse Boutique uses a periodic inventory system....
-
Produce a method that combines elements from two LinkedLists of the same size, alternating between them. This must be done using the following methods from the Queue Interface: add(), remove(), and...
-
Saturated water vapor is contained in a rigid container. Its energy is then increased until the the pressure and temperature become 165.401 kPa and 400 C, respectively. What was the initial...
-
# 3. What do these loops print? for (int i = 1; i <10; i++) { } cout < < i < < " "; # 4. for (int i = 1; i < 10; i += 2) { } cout < < i < < " ";
-
Database administrators (DBA) manage several key databases. Database administrators have access to the database but not the server operating system. Manipulation of data in any of these databases...
-
he Maple Building Company currently builds large portable offices (i.e., pods) and large retail spaces based on customized plans. The company has been in business 20 years and has prided itself on...
-
1. XYZ Inc. sold $5,000,000 of 7.5%, 25-year, semiannual payment bonds 20 years ago. The bonds are not callable, but they do have a sinking fund provision requiring 10% of the original face value to...
-
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?
-
Correctly apply the rules for the order of operations to accurately compute \(\left(\frac{5}{7}-\frac{2}{7} ight) \times 2^{3}\).
-
James is mixing soil for a raised garden, in which he plans to grow a variety of vegetables. For the soil to be suitable, he determines that \(\frac{2}{5}\) of the soil can be topsoil, but...
-
Correctly apply the rules for the order of operations to accurately compute \(4+\frac{2}{3} \div\left(\left(\frac{5}{9} ight)^{2}-\left(\frac{2}{3}+5 ight) ight)^{2}\).
Study smarter with the SolutionInn App