Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the popular game called Scrabble, each letter of the English alphabet has a particular score as described in the table below: The Scrabble score

image text in transcribed

In the popular game called Scrabble, each letter of the English alphabet has a particular score as described in the table below: The Scrabble score of a word is the sum of the scores of its letters. Thus, the words 'ANT', 'QUIZ', and 'APPLE' are scored in the following way: ANT=A+N+T=1+1+1=3 QUIZ=Q+U+I+Z=10+1+1+10=22 APPLE=A+P+P+L+E=1+3+3+1+1=9 For this project you will be provided with a list of 500 common names in main.py Complete the Python program so that it prints the sum of Scrabble scores of all names from that list that has the following properties: The names have at most two unique letters in common with your 7 letter unique word. As an example, if your word is ORCHIDS, then the name MARY matches this condition (because 1 unique letter -- R - - is common) and should be considered when computing the Scrabble score sum. Similarly, MARCY also matches (because two unique letters, R and C are common). The name JERRY also matches this condition (because R is uniquely common to both). However, the name PATRICIA does not match (R,I,C are 3 unique letters common with ORCHIDS). Here are some recommendations: - You are free to use your own functions. A function can be written that returns the Scrabble score of a single letter -- and it has been provided. Another function can be written that returns the Scrabble score of a word -this has also been provided. - You may use a dictionary that is populated with key-value pairs of letters and their corresponding Scrabble score. A sample dictionary has been provided to help you get started. You need to populate further for all other letters. - Make sure you print the sum and nothing else. Comment out all other print statements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Upgrade Migration And Transformation Tips And Techniques

Authors: Edward Whalen ,Jim Czuprynski

1st Edition

0071846050, 978-0071846059

More Books

Students also viewed these Databases questions