
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text: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 using the given dictionary of letters and point values that takes a word as input and outputs the base total value of the
word (before being put onto a board).
Ex: If the input is:
PYTHON
the output is:
PYTHON is worth 14 points.
461710.3116374.qx3zqy7
LAB
ACTIVITY
1 tile_dict = { 'A': 1, 'B': 3,
'K': 5, 'L': 1,
'U': 1, 'V': 4,
12345
2
3
6.27.1: LAB: Scrabble points
4
5'' Type your code here.
111
'C': 3, 'D': 2,
'M': 3, 'N': 1,
'W': 4, 'X': 8,
main.py
'E': 1, 'F': 4,
'0': 1, 'P': 3,
'Y': 4, 'Z': 10 }
0/10
Load default template...
'G': 2, 'H': 4, 'I': 1, 'J': 8,
'Q': 10, 'R': 1, 'S': 1, 'T': 1,
Expert Solution

arrow_forward
Step 1 Algorithm
1.Start
2.Create dictionary tile_dict
3.Create function scrabblepoints() and pass word entered by user as argument to that function.This function will return sum of values of letters whatever present in entered word by using dictionary tile_dict
4.Input a word
5.call function scrabblepoints()
6.Display output
7.End
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

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.Similar questions
- Write a program in python that reads a list of words. Then, the program outputs those words and their frequencies. Ex: If the input is: hey hi Mark hi mark the output is: hey 1 hi 2 Mark 1 hi 2 mark 1arrow_forwardCreate a Python program that can compute for the compatibility of two zodiac signs. Follow the algorithm to calculate the compatibility of the Zodiac Signs.(1) Ask the user for signs.(2) From the zodiac signs, count the number of P's, A's, I's, R's and S's from each input.For example, for the signs Aquarius and Taurus, the values are:P - 0A - 3I - 1R - 2S - 2 (3) Add two numbers at a time until you end with 2 digits as shown in the following: (attached image)Note: When adding the numbers, remove the tens digit and only add the ones digit. For the final percentage, only get the ones values.(4) Display the percentage.arrow_forwardWrite a program that reads two integers as input, and outputs the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer. Answer in Coral Language Ex: If the input is: -15 30 the output is: -15 -5 5 15 25 Ex: If the second integer is less than the first as in: 20 5 the output is: Second integer can't be less than the first. For coding simplicity, output a space after every integer, including the last.arrow_forward
- You will be given a list of tuples where each tuple indicates a point i.e. (x, y) in a 2-dimensional coordinate system. You need to write a python program to find the minimum distance and the point that is closest to the origin i.e. (0,0) ===================================================== Hint: The formula of distance = √((Δx)2+(Δy)2) As you are calculating the distance from the origin (0,0), you can simply usedistance = √(x2+y2) You can create a list of distances from each point and sort that list using your personal favorite sorting algorithm. You can use python build-in functions for list: list.index(), min() ===================================================== Sample Input 1 [(5,3), (2,9), (-2,7), (-3,-4), (0,6), (7,-2)] Sample Output 1 The closest point is (-3, -4) which has a distance of 5.0 from the origin. ===================================================== Sample Input 1 [(1,7), (4,5), (-1,7), (-2,0), (1,1), (5,-1)] Sample Output 1 The closest point is (1, 1) which has a…arrow_forwardWrite a Python Program that will simulate a registration system, as follows: Welcome: Display a message to welcome the user and ask for their info Capture user input: Ask the user to input the following information: o First name (String) Last name (String) o Age (integer) you must adjust value by subtracting 2 years Current GPA (float) you must adjust by adding 0.5 o Hobbies (only 3) (a string Collection containing 3 items) (all strings) Hint: you can ask user to specify each hobby one by one, and then you can update (or add) each item to the Collection Display user information: thank user for registration & show their info Goodbye: Display a Goodbye message and end Programarrow_forwardWrite a program that reads a positive integer n, and prints the first n even numbers in Python.arrow_forward
- Create a program in Python that reads a multi-word phrase, and prints the Camel Case equivalent. For example, for input “total account balance” the program shall output “totalAccountBalance”. Notice the first word is lower case and the others are capitalized. I have been attempting this question for some time and need some assistance.arrow_forwardComputer Science Write a Java program that reads a line and a line segment and then determines whether they intersect or not. When they overlap completely, consider that as intersecting. Use variables ((lp1x, lp1y), (lp2x, lp2y)) to represent a line and ((sp1x, sp1y), (sp2x, sp2y)) to represent a line segmentarrow_forwardMake a Simple unit converter in Python that supports (length and time) and inputs the value and the initial unit measurement. Using the mentioned measurements (length and time). The user will pick either length or time. it then computes and shows the three types of conversion (Ex. 12 inches = (1) foot/feet, (30.48) centimeters, (304.8) millimeters). The unit conversion program allows the user to input a chosen conversion and repeats the program until the word “stop” is typed.arrow_forward
- As you know, you can find the area of a rectangle by multiplying its length by its width. You can also find the perimeter by adding the lengths of all four sides together. Write a Python program that accepts a base and height from the user as input and neatly prints the perimeter, the area, and the longest side. You output should be formatted similarly following. Notice that the decimal points are aligned, and all values are rounded to two decimal places with no commas; remember to use format()!arrow_forwardWrite a program that takes in a year and you need to determines whether that year is a leap year..arrow_forwardWrite a program that reads a list of words. Then, the program outputs those words and their frequencies (case insensitive). Ex: If the input is: hey Hi Mark hi mark the output is: hey 1 Hi 2 Mark 2 hi 2 mark 2 Hint: Use lower() to set each word to lowercase before comparing. In Python Please.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education