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
When technology advances which of the following always takes place?
natulia [17]
When technology advances, the option that always takes place is that results are improved.
As technology progresses and becomes better and better, the things we want to achieve using it become more realistic. So the result we wanted to get to become closer to us, and not just a thing that belongs to a distant future. Technological advances ALWAYS improve results, whereas the remaining options do not necessarily happen always.
6 0
3 years ago
Read 2 more answers
You must configure a certificate authority on your network to use EFS. True or False?
Westkost [7]

You do not need to configure a certificate authority on your network to use EFS.

<em>EFS</em> is the short form for<em> Encryption File System</em>. With EFS, users can encrypt their files and folders and even the entire content of a given drive. By encrypting these files and folders, the access to them are restricted and thus increasing, improving and enhancing the security level of the users' data.

In other words, even though there are other ways to restrict access (such as using <em>logon authentication</em> and <em>NTFS file permissions</em>), EFS allows to add another layer of security to data.

To <em>encrypt</em> and <em>decrypt</em> data files and folders in EFS, a <em>certificate authority (CA)</em> could be used. This is however not a requirement. In the case where there is no certificate authority, EFS  will sign a default certificate that will be used for encryption. In other words, <em>EFS will generate its own certificate</em> if none does not exist.

<em>The following are other things to note about EFS</em>

i. EFS uses a public and private key pair to encrypt data.

ii. Users do not need to enable EFS. It is enabled by default.

iii. For EFS to encrypt a file, the NTFS file system must be used.

Since a certificate authority is not required on your network to use EFS, the correct option is:

(b) False.

Read more at: brainly.com/question/10410730

6 0
3 years ago
Is this correct? I say its B, but my friend says its D.
kari74 [83]

Answer:

b

Explanation:

4 0
3 years ago
Read 2 more answers
Ron is creating building blocks in Word. How can he make the building blocks that he created available?
Gre4nikov [31]

Answer: store those building blocks in the Normal template

Explanation:

Since Ron is creating building blocks in Word, he can make the building blocks that he created available by storing those building blocks in the normal template.

It should be noted that building blocks include lists, tables, text boxes or other contents that an individual uses for his or her word document.

So as to make them readily available whenever they're needed, it is important that they should be stored in the normal template. It will allow for easy access.

3 0
3 years ago
Read 2 more answers
Write a program with a method that plays the guess a number game. The program should allow the user to pick a number between 1 a
nlexa [21]

Answer:

Please check the explanation

Explanation:

That's the code and it is done with the program in c++ according to instructions given in the question using binary search. It can guess the correct number in 10 or fewer attempts and also shows the number of attempts it took to guess the number.

​ #include <iostream> using namespace std; int guess() { string input; int l = 1, h = 1000; int mid = (l + h) / 2, count = 0; while (1) { //count the number of attemts to guess the number ++count; //cout << count << "\n"; cout << "\n"; cout << "Is " << mid << " correct? (y/n): "; cin >> input; //if input is y print the guessed no. and return if (input == "y") { cout << mid << " guessed in " << count << " attempts!\n"; return 1; } //if input is n ask the user if it's higher or lower than current guess if (input == "n") { cout << "Is the number greater than or less than the number ? (h/l): "; cin >> input; } //if input is higher assign mid incremented by 1 to low //else decrement mid by 1 and assign to high if (input == "h") l = mid + 1; else h = mid - 1; //calculate mid again according to input by user again mid = (l + h) / 2; } } int main() { cout << "****WELCOME TO THE GUESS THE NUMBER GAME!****\n"; cout << "Guess any number between 1 to 1000.\n"; cout << "This game depends on user giving correct answers and not changing their number middle of game.\n"; guess(); } ​

8 0
3 years ago
Other questions:
  • Mobile providers can be susceptible to poor coverage indoors as a result of: a high degree of latency. network congestion that c
    8·1 answer
  • Which type of system must you connect to and use to make changes to Active Directory?
    15·1 answer
  • Crowdsourcing is:
    5·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • Which spreadsheet operation does a look function perform?
    5·1 answer
  • In gaming, "rendering" refers to:
    12·2 answers
  • Hoda wants to create a new presentation in PowerPoint with existing graphics and designs. What is the easiest and fastest way fo
    14·1 answer
  • What is the maximum number of characters you can have in a file name​
    8·1 answer
  • Who do we need more in the world? Computer technicians, or electric technicians and why.
    9·1 answer
  • Write a one register parameter procedure that converts an ASCII digit in AL to its corresponding binary value. If AL already con
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!