1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex73 [517]
3 years ago
8

Scrabble is a word game in which words are constructed from letter tiles, each letter tile containing a point value. The value o

f 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: 14
Computers and Technology
1 answer:
Fantom [35]3 years ago
6 0

Complete question:

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: 14

part of the code:

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 }

Answer:

Complete the program as thus:

word = input("Word: ").upper()

points = 0

for i in range(len(word)):

   for key, value in tile_dict.items():

       if key == word[i]:

           points+=value

           break

print("Points: "+str(points))

Explanation:

This gets input from the user in capital letters

word = input("Word: ").upper()

This initializes the number of points to 0

points = 0

This iterates through the letters of the input word

for i in range(len(word)):

For every letter, this iterates through the dictionary

   for key, value in tile_dict.items():

This locates each letters

       if key == word[i]:

This adds the point

           points+=value

The inner loop is exited

           break

This prints the total points

print("Points: "+str(points))

You might be interested in
Use any platform to write about cybersecurity
Amiraneli [1.4K]

Answer:

Cyber security is the application of technologies, processes and controls to protect systems, networks, programs, devices and data from cyber attacks. It aims to reduce the risk of cyber attacks and protect against the unauthorised exploitation of systems, networks and technologies.

3 0
3 years ago
Read 2 more answers
Describe the steps that transform a program written in a high-level language such as C into a representation that is directly ex
Alla [95]

Answer:

First, you would want to translate from C-language Program (in text format) into the assembly language Program (still in text format, but in the corresponding architecture of the computer where the program will be run). The software tool you will use for this step is Compiler.

Then you would translate from the assembly language program (text format) into Machine Code Program (in binary format). The software tool used for this step would be Assembler.

7 0
2 years ago
Which of the following statements are TRUE about formatting images in HTML.
DiKsa [7]

The following statements are TRUE about formatting images in HTML is that In HTML, when formatting images, there is no pixel limit for the width and height attributes.

<h3>What are formatting images in HTML.?</h3>

One of the most effective approaches to resize a photograph withinside the HTML is the usage of the peak and width attributes at the img tag. These values specify the peak and width of the photographic element. The values are set in px i.e. CSS pixels. For example, the authentic photograph is 640×960.

When you figure with historical past images, you can need an photograph to stretch to healthy the web page no matter the huge variety of gadgets and display screen sizes. The fine manner to stretch a photograph to healthy the historical past of detail is to apply the CSS3 property, for historical past size and set it identical to the cover.

Read more about the  HTML:

brainly.com/question/4056554

#SPJ1

6 0
2 years ago
How can a vpn make use of connection types that include multiple channels, and allow for multilink connections?
horsena [70]

Multilink<u> </u>and Bandwidth Allocation Protocol  can a vpn make use of connection types that include multiple channels, and allow for multilink connections

Bandwidth Allocation Protocol (BAP) generally manages the total number of links in a multilink bundle. It is especially valuable to different operations that usually contain carrier charges based on bandwidth utilization.

<h3>What is bandwidth allocation?</h3>

Bandwidth allocation is the process of assigning radio frequencies to different applications. The radio spectrum is a finite resource, which means there is great need for an effective allocation process.

To learn more about Bandwidth allocation, refer

brainly.com/question/14617183

#SPJ4

4 0
2 years ago
What are the most common types of cables in a network?
Maru [420]

the most common are twisted pair, coaxial, Ethernet cross over, and fiber optic.

4 0
3 years ago
Other questions:
  • What is also known as a visual aid in a presentation
    8·2 answers
  • The Smith family has five children who work in a variety of careers. They include a Building Designer, an Astrophysicist, a Comp
    14·2 answers
  • Which feature does the web designer fail to apply in this layout for a web page? A. harmony
    8·2 answers
  • If my computer is next to my book, what preposition would I use?<br> O xià<br> 0 shàng<br> pangbian
    7·1 answer
  • Which term describes the order of arrangement of files and folders on a computer?
    15·1 answer
  • 17. Which of the following game development companies is credited with launching and perfecting the sports simulation genre?
    5·1 answer
  • Which of the following is considered to be open-end credit?
    6·2 answers
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • How does a python programmer concatenate a numeric value to a string value?
    7·1 answer
  • Security is a major concern with m-commerce. How can m-commerce software ensure the security of transmissions and that the trans
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!