Please Use PYTHON  def count_scrabble_points(user_input):     """     The function ...     """     tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8,                'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, 'S': 1, 'T': 1,                'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 } if __name__ == "__main__":     ''' Type your code here. '''

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

Please Use PYTHON 

def count_scrabble_points(user_input):
    """
    The function ...
    """
    tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, 'S': 1, 'T': 1, 
              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }


if __name__ == "__main__":
    ''' Type your code here. '''

LAB
ACTIVITY
1 def count_scrabble_points (user_input):
2
3
4
5
6
7
8
9
7.17.1: LAB: Scrabble points
10 if
11
_name__ == "__main__":
main.py
The function ...
tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, "G': 2, 'H': 4, "I': 1, 'J': 8,
'K': 5, 'L': 1, 'M': 3, 'N': 1, '0': 1, 'P': 3, 'Q': 10, 'R': 1, 'S': 1, 'T': 1,
'X': 8, 'Y': 4, 'Z': 10 }
'U': 1, 'V': 4, 'W': 4,
Type your code here. ***
0/14
Load default template...
Transcribed Image Text:LAB ACTIVITY 1 def count_scrabble_points (user_input): 2 3 4 5 6 7 8 9 7.17.1: LAB: Scrabble points 10 if 11 _name__ == "__main__": main.py The function ... tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, "G': 2, 'H': 4, "I': 1, 'J': 8, 'K': 5, 'L': 1, 'M': 3, 'N': 1, '0': 1, 'P': 3, 'Q': 10, 'R': 1, 'S': 1, 'T': 1, 'X': 8, 'Y': 4, 'Z': 10 } 'U': 1, 'V': 4, 'W': 4, Type your code here. *** 0/14 Load default template...
Instructions
A, B, C, D, E, F, G,
HI, J, K, L, M,
N,
O, P, Q, R, S, T, U,
V, W, X, Y, Z,
8
10
Scrabble is a word game in which words are constructed from letter tiles, each letter tile containing a point value. The value of a word is the
sum of each tile's points added to any points provided by the word's placement on the game board.
Write a program that takes a word as input and outputs the base total value of the word by calling count_scrabble_points ().
Implement count_scrabble_points () to calculate the total points for the given string (the function's parameter) and return this total.
Example
If the input is:
PYTHON
KR
the output is:
14
Why 14?
Because we look up the score for each letter and get
'P': 3
'Y': 4
'T': 1
'H': 4
'0': 1
'N': 1
When we sum up the respective points, we get 14.
434248.2064302.qx3zqy7
Transcribed Image Text:Instructions A, B, C, D, E, F, G, HI, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 8 10 Scrabble is a word game in which words are constructed from letter tiles, each letter tile containing a point value. The value of a word is the sum of each tile's points added to any points provided by the word's placement on the game board. Write a program that takes a word as input and outputs the base total value of the word by calling count_scrabble_points (). Implement count_scrabble_points () to calculate the total points for the given string (the function's parameter) and return this total. Example If the input is: PYTHON KR the output is: 14 Why 14? Because we look up the score for each letter and get 'P': 3 'Y': 4 'T': 1 'H': 4 '0': 1 'N': 1 When we sum up the respective points, we get 14. 434248.2064302.qx3zqy7
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT