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. '''
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. '''
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2GZ
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...](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fccac55ee-732b-4607-a38e-f5bd0a8aacb2%2F5db75687-f2d5-4583-b3a0-dc39687093a5%2F5bvu4og_processed.png&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fccac55ee-732b-4607-a38e-f5bd0a8aacb2%2F5db75687-f2d5-4583-b3a0-dc39687093a5%2F1p5ge8n_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT