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

Answers

Answer 1

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))

Answer 2

Answer:

Here is the exact code, especially if you want it as Zybooks requires

Explanation:

word = input("").upper()

points = 0

for i in range(len(word)):

  for key, value in tile_dict.items():

      if key == word[i]:

          points+=value

          break

print(""+str(points))


Related Questions

If a 9V, 7W radio is on from 9am to 12pm. Calculate the amount of charge that flows through it, hence or otherwise the total number of free electrons that pass through at a point at the power supply terminals​

Answers

Answer:

Q=It

and

p=IV

Given, v=9V P= 7W

I=P/V

I =7/9

Also, time(t) from 9am to 12pm is 3hrs

Converting into sec =3×3600

t=10800

Q= 7/9 ×10800

Q =8400C

wassup anybody tryna play 2k

Answers

Answer:

u dont want the smoke my boy u dont

Explanation:

Answer:

I only play 24k B)))))))))

Mikolas is doing a research on U.S. visas for a school project. He has found conflicting information on two sites. The first site is travel.state.gov and the other is traveldocs.com. Which site should Mikolas trust more?

Traveldocs.com

Travel.state.gov

Answers

Answer:

Travel.State.Gov

Explanation:

This is a government website explaining visas which should be very well trusted. However, traveldocs.com could be made by any person who does or doesn't know what they're talking about.

What are the two functions in C that allow a programmer to randomly move the file cursor within a file stream, thus enabling random access. Please write down the names of the two functions and separate them by a comma only. As an example, assume the two functions are abc, and abe, you will write down your answer as abc,abe

Answers

Answer:

seekp(),tellp()

Explanation:

The two functions in c ++ that allow a programmer to randomly move the file cursor within a file stream are : seekp(),tellp()

The functions place cursor in file stream and also access the values

Suppose Alice downloads a buggy browser that implements TLS incorrectly. The TLS specification says that, during the handshake, the browser should send a random 256-bit number RB. Instead of picking RB randomly the browser always sends all zeros. Describe an attack that is possible against this buggy browser and how to update the browser so that this attack is no longer feasible.

Answers

Solution :

It is given that Alice downloads the buggy browser which implements a TLS incorrectly. The specification of a TLS states that during a handshake, the browser sends a 256 bit number of RB randomly.

So in this case, a man-n-the-middle attack is possible. It can compromise the confidentiality of Alice. Updating the browser by visiting the website and checking its latest version of the browser or installing some other browser which has a more trust in the market for its security features.

what is subnetting. what does subnetting mean

Answers

Answer:

Subnetting is the practice of dividing a network into two or more smaller networks. It increases routing efficiency, enhances the security of the network and reduces the size of the broadcast domain.

Explanation:

Can two computers be assigned to one IP address

Answers

Answer:

two computers cannot have the same public (external) IP address unless they are connected via the same router. If they are connected via the same router, then they can have (share) the same public IP address yet have different private (local) IP addresses

Explanation:

Answer: maybe

Explanations: two computers cannot have the same public (external) IP address unless they are connected via the same router. If they are connected via the same router, then they can have (share) the same public IP address yet have different private (local) IP addresses.

Write a template that accepts an argument and returns its absolute value. The absolute entered by the user, then return the total. The argument sent into the function should be the number of values the function is to read. Test the template in a simple driver program that sends values of various types as arguments and displays the results.

Answers

Answer:

In python:

The template/function is as follows:

def absval(value):

   return abs(value)

Explanation:

This defines the function

def absval(value):

This returns the absolute value of the argument using the abs() function

   return abs(value)

To call the function from main, you may use:

print(absval(-4))


Ineeedd help please 35 points question

Answers

Answer:

1

Explanation:

The four gates on the left are XNOR gates, their output is 1 if both inputs are equal. This is the case (given), so all inputs to the quadruple AND gate are 1, hence the output is also one.

Write one line Linux command that performs the required action in each of the problems given below: (a) Find the difference in text between two text files File1.txt and File2.txt and save the result in a file named result.txt (b) Change the permissions of the file remote_driver.c such that the owner has the permissions to read, write and execute and anybody other than the owner can only read the file but cannot write or execute. (c) Search for the string ir_signal in the file /home/grad/remote_driver.c and print on the terminal the number of instances of the given string in the file /home/grad/remote_driver.c (d) Reboot the system after 5 minutes. (e) Display the list of processes currently being run by the user harvey. (f) Print 3 copies of a file named my_driver.c from a printer that has a name HPLaserJet4300. (g) Put the last 40 lines of the file driver_log.log into a new file final_fault.txt.

Answers

You have to add the integer

whats the most popular social networking in the philippines?

Answers

Y o u t u b e

It wont let me say the word above

Write a Java program that uses a value-returning method to identify the prime numbers between 2 bounds (input from the user). The method should identify if a number is prime or not. Call it in a loop for all numbers between the 2 bounds and display only prime numbers. Check for errors in input.Note:A number is prime if it is larger than 1 and it is divisible only by 1 and itself(Note: 1 is NOT a prime number)Example:15 is NOT prime because 15 is divisible by 1, 3, 5, and 15; 19 is prime because 19 is divisible only by 1 and 19.

Answers

Answer:

Answered below.

Explanation:

public int[] primeNumbers(int lowBound, int highBound){

if(lowBound < 0 || highBound < 0 || lowBound >= highBound){

System.out.print("invalid inputs");

else if(highBound <= 1){

System.out.print("No prime numbers);

}

else{

int[] nums;

for(int I = lowBound; I <= highBound; I++){

if(isPrime (I)){

nums.add(I);

}

}

return nums;

}

Suppose you are working as an administrative assistant at a small law firm. Your boss has asked you to send an invitation out to all employees about the upcoming holiday party. You would like to spruce up the invitation with a few festive images and a fancy border. Which file format would allow you to create a visually appealing invitation that can easily be e-mailed?

JPEG

PDF

SVG

TIFF

Answers

Answer:

PDF

Explanation:

Just did the assignment egde 2021

Answer:

It is B: PDF, as shown in the picture below

Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced. Ex: If the input is: automobile car manufacturer maker children kids The automobile manufacturer recommends car seats for children if the automobile doesn't already have one.

Answers

Answer:

In Python:

toreplace = input("Word and replacement: ")

sentence = input("Sentence: ")

wordsplit = toreplace.split(" ")

for i in range(0,len(wordsplit),2):

   sentence = sentence.replace(wordsplit[i], wordsplit[i+1])

print(sentence)

Explanation:

This gets each word and replacement from the user

toreplace = input("Word and replacement: ")

This gets the sentence from the user

sentence = input("Sentence: ")

This splits the word and replacement using split()

wordsplit = toreplace.split(" ")

This iterates through the split words

for i in range(0,len(wordsplit),2):

Each word is then replaced by its replacement in the sentence

   sentence = sentence.replace(wordsplit[i], wordsplit[i+1])

This prints the new sentence

print(sentence)

If D3=30 and D4=20, what is the result of the function
=IF(D4 D3, D3-D4, "FULL")?
0-10
O Unknown
O 10
O Full

Answers

Answer:

c. 10

Explanation:

Given

[tex]D3 = 30[/tex]

[tex]D4 = 20[/tex]

Required

The result of: [tex]=IF(D4 < D3,D3-D4,"FULL")[/tex]

First, the condition D4 < D3 is tested.

[tex]D4 < D3 = 20 < 30[/tex]

Since 20 < 30, then:

[tex]D4 < D3 = True[/tex]

The condition is true, so:

D3 - D4 will be executed.

[tex]D3 - D4 = 30 - 20[/tex]

[tex]D3 - D4 = 10[/tex]

Hence, the result of the function is 10

arrange the following numbers from the highest to the lowest. ⅔,-7,0. no file or photo​

Answers

Answer:

2/3, 0, -7

Explanation:

what is the economic and ideological causes of the American, the French,and the Chinese revolutions, and to see the larger historical contexts in which these events took place?​

Answers

Answer:

Explanation:The French who had direct contact with the Americans were able to successfully implement Enlightenment ideas into a new political system. The National Assembly in France even used the American Declaration of Independence as a model when drafting the Declaration of the Rights of Man and the Citizen in 1789.

What is software and explain the five types of software

Answers

Question: What is software and explain the five types of software

Explanation: The system software which is controlled and managed by the use of set of instructions and programs is called software.

Ex: Windows 7/8/10/xp etc...

the  types of software are'

system software and application software

Android.

CentOS.

iOS.

Linux.

Mac OS.

MS Windows.

Ubuntu.

Unix.

Answer:

What is system software and explain its types?

System Software

A system software aids the user and the hardware to function and interact with each other. Basically, it is a software to manage computer hardware behavior so as to provide basic functionalities that are required by the user.

6
Suppose the following formula is inputted into Excel:
=MROUND(1/4,100)
The output in the cell will be:
0
0.25
0.2500
1

Answers

Answer:

the output in the cell will be 0,2500

Write a client program ClientSorting2 and in the main() method: 1. Write a modified version of the selection sort algorithm (SelectionSorter()) that sorts an array of 23 strings (alphabetically) rather than one of integer values. Print the array before it is sorted in the main() method, then after it is sorted in SelectionSorter().

Answers

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

 public static void SelectionSorter(String[] my_array){

     System.out.print("\nAfter sort: ");

     for (int ind=0; ind < 22; ind++ ){

         int min = ind;

         for (int k=ind+1; k < 23; k++ )

         if (my_array[k].compareTo(my_array[min] ) < 0 ){ min = k;  }

         String temp = my_array[ind];

         my_array[ind] = my_array[min];

         my_array[min] = temp;    }

   for (int j=0; j < 23; j++){   System.out.print(my_array[j]+" ");}

    }

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String [] myarray = new String [23];

 for(int i= 0;i<23;i++){ myarray[i] = input.nextLine();  }

 System.out.print("Before sort: ");

 for ( int j=0; j < 23; j++ ){        System.out.print(myarray[j]+" ");    }

 SelectionSorter(myarray);

}

}

Explanation:

This defines the function

 public static void SelectionSorter(String[] my_array){

This prints the header for After sort

     System.out.print("\nAfter sort: ");

This iterates through the array

     for (int ind=0; ind < 22; ind++ ){

This initializes the minimum index to the current index

         int min = ind;

This iterates from current index to the last index of the array

         for (int k=ind+1; k < 23; k++ )

This compares the current array element with another

         if (my_array[k].compareTo(my_array[min] ) < 0 ){ min = k;  }

If the next array element is smaller than the current, the elements are swapped

         String temp = my_array[ind];

         my_array[ind] = my_array[min];

         my_array[min] = temp;    }

This iterates through the sorted array and print each array element

   for (int j=0; j < 23; j++){   System.out.print(my_array[j]+" ");}

    }

The main begins here

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

This declares the array

 String [] myarray = new String [23];

This gets input for the array elements

 for(int i= 0;i<23;i++){ myarray[i] = input.nextLine();  }

This prints the header Before sort

 System.out.print("Before sort: ");

This iterates through the array elements and print them unsorted

 for ( int j=0; j < 23; j++ ){        System.out.print(myarray[j]+" ");    }

This calls the function to sort the array

 SelectionSorter(myarray);

}

}

Explain what an IM is,

Answers

Answer: Stands for "Instant Message." Instant messaging, or "IMing," as frequent users call it, has become a popular way to communicate over the Internet

Explanation:

what is digital literacy? describe three examples of digital literacy skills

Answers

Digital literacy means having the skills you need to live, learn, and work in a society where communication and access to information is increasingly through digital technologies like internet platforms, social media, and mobile device

Examples of Digital Literacy skills:

What is digital literacy?

ICT proficiency.

Information literacy.

Digital scholarship.

Communications and collaborations.

Digital learning.

Digital identity.

Write a recursive method called sumTo that accepts an integer parameter n and returns a real number representing the sum of the first n reciprocals. In other words, sumTo(n) returns (1 1/2 1/3 1/4 ... 1/n). For example, sumTo(2) should return 1.5. The method should return 0.0 if it is passed the value 0 and throw an IllegalArgumentException if it is passed a value less than 0.

Answers

Answer:

Sorry mate I tried it was wrong

Explanation:

Sorry again


Open Office software is an example of what software

Answers

Answer:

Application software

Explanation:

OpenOffice.org (OOo), commonly known as OpenOffice, is a discontinued open-source office suite. ... OpenOffice included a word processor (Writer), a spreadsheet (Calc), a presentation application (Impress), a drawing application (Draw), a formula editor (Math), and a database management application (Base).

You are the IT administrator for a small corporate network. You have just changed the SATA hard disk in the workstation in the Executive Office. Now you need to edit the boot order to make it consistent with office standards. In this lab, your task is to configure the system to boot using devices in the following order: Internal HDD. CD/DVD/CD-RW drive. Onboard NIC. USB storage device. Disable booting from the diskette drive.

Answers

Answer:

this exercise doesn't make sense since I'm in IT

Explanation:

Why is dark supereffective against ghost? (AGAIN)

I don't get it. I get why it is supereffective against psychic, because even the greatest minds are scared of criminal activities, but why would it be good against ghost?
AND GIVE ME AN ACTUAL ANSWER THIS TIME. DON"T ANSWER IF YOU DON"T KNOW OR IF YOUR ANSWER ISN'T IN ENGLISH.

Answers

Answer: Think of it in this way: People often warn others not to speak badly of the Dead. Why? This is because, it is believed that their souls get "restless", and this causes them to haunt others. Thus, Dark type moves, that symbolise the "evil" aspect of the Pokemon, are super-effective against Ghosts. Type chart, effectiveness and weakness explained in Pokémon Go

Type Strong Against Weak Against

Bug Grass, Psychic, Dark Fighting, Flying, Poison, Ghost, Steel, Fire, Fairy

Ghost Ghost, Psychic Normal, Dark

Steel Rock, Ice, Fairy Steel, Fire, Water, Electric

Fire Bug, Steel, Grass, Ice Rock, Fire, Water, Dragon

Explanation: hopes this helps

A slide contains three text boxes and three images that correspond to the text boxes. Which option can you use to display a text box with its
image, one after the other, in a timed sequence?
A. transition
В. table
C. animation
D. slide master
E. template

Answers

The answer is A. Transition.

Answer:

animation

Explanation:

Programming a computer to win at chess
has been discussed since the
A. 1940's
B. 1950's
C. 1960's

Answers

I believe it was the 1960s but u should seach it up to double check

Answer:

B.

Explanation:

what is a . com in a web address mean

Answers

Answer:

dot commercial

Explanation:

.edu education

.gov goverment

Answer:

Commercial

Explanation:

While all pages use HTML code, not all pages are written in

Answers

Is this a question?

*Answer: not much information to answer with*

Answer:

Code Form

Explanation:

Other Questions
How are people affected by love in this text? Is it positive or negative?( from "Echo and Narcissus" commonlit) WILL GIVE BRAINLIESTGive several reasons why Python is such a great programming language. Explain how Python is related to flowcharts.Consider this program:Cost1 = input("Please enter the first expense: ")Cost2 = input("Please enter the second expense: ")print("Your total for both expenses was", Cost1 + Cost2)If the user inputs 10 for the first expense and 20 for the second expense, what will the interpreter show in the final line when this program is run? If this result in not what the programmer intended, how would you explain what went wrong?You are writing a line of code that should ask the user to input the balance of their bank account in dollars and cents. The program will then perform a multiplication problem to tell the user how much interest they can earn. Identify three errors in your line of input code and explain why they are incorrect. Include the corrected line of code in your answer. Here is the code:1num = input(What is your balance?)What are some kinds of comments that might be useful for a programmer to include in a program?If you were planning how to write a program, at what point would a flowchart be helpful? At what point would pseudocode be helpful? Explain your reasoning. 6-4x+6(x-2) solve for x Two reasons Why learners perform well in grade 12 and are still not accepted into Universities Which event foreshadows Piggy's death in Lord of the Flies?A. Piggy tells Ralph that if Ralph were not around, Jack would hurt Piggy.B. Piggy tells Ralph that he does not know how to swim.C. Piggy tells Ralph that his father is dead and that he used to live with an aunt.D. Piggy tells Ralph that there are no matches to start a fire. Rita is a salon owner. She notices that her salon charged one of her clients, Linda, extra for a service that the clent did not request. What do you think Rita should do? . Remaln qulet about the extra money. B. Distribute the money equally among the staff. C. Call the client and Inform her that she was incorrectly charged. D. Try overcharging the next client too and check if it goes unnoticed. What impact did the Holocaust have on the Jewish and Roma populations of Europe? This diagram shows three small squares and two rectangles composed of 10 small squares.Diagram of 3 small squares and two rectangles composed of 10 small squares.a. Jada says this diagram can represent 230. What does a small square represent for Jada? The Phillips curve was first suggested as a description of the relationship between inflation and unemployment in the late 1950s, and data through the 1960s were consistent with its predictions. What happened in the 1970s? Montaigne believes that students learn best by a. reading and taking notes. c. taking tests. b. following their interests. d. home schooling. What is the volume 9inches 3inches 5inches Question 1Choosethe appropriate forms of ser or estar to complete the followingsentences:Los nios (ser)_______corteses. La familia (estar)_______ en laplaza.- Es- Esta - Estan- son4.Question 4Howdo you conjugate the verb empezar inthe following sentence?La obra de teatro __________ a las ocho.- empeza-empieza - empezan empiezas 5.Question 5Whichanswer best expresses: Its very cold there- Hace mucho calor ah.- Hacen muchos fros ah.- Hacen muchos calores ah.-Hace mucho fro ah. What does dalton mean PLEASE HURRYList three colors in a warm analogous color scheme: how did Clarina Nichols work to promote her side of the slavery issue? PLEASE HELP I WILL MARK YOU BRAINIEST Find measure of angle A If the harmonic is 66 Hz, find the fundamental frequency pampalasa ang hinahanap ng produkto mula sa Moluccas.Tama o Mali P S Q R The biological levels of organization range from a single organelle all the way up to the biosphere in a highly structured hierarchy. Multicellular organisms are organized from the simplest to most complex: cells, tissues, organs, organ systems, organisms. Evaluate the model above. Select ALL of the statements that accurately depict the examples shown in the model. A) R shows an animal cell. B) O shows types of tissue. P shows organs in the endocrine system. D) P shows an organ system, the digestive system. E) S shows an organ system, the digestive system.