Use this constant dictionary as a global variable:
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 }
Implement function scrabblePoints(word) that returns the calculated points for the word based on the tile_dict above. The word parameter is a string. This function takes the string and evaluates the points based on each letter in the word (points per letter is set by the global dictionary). P or p is worth the same points. No points calculated for anything that is not A-Z or a-z.
[You may use upper() and isalpha() ONLY and no other method or built-in function]
Examples:
word = “PYTHON”
print(scrabblePoints(word))
returns:
14
word = “hello!!”
print(scrabblePoints(word))
returns:
8
word = “@#$=!!”
print(scrabblePoints(word))
returns:
0
Note: This function relies on scrabblePoints. Function you solved in Question 2.
Implement function declareWinner(player1Word = “skip”, player2Word = “skip”) that returns either “Player 1 Wins!”, “Player 2 Wins!”, “It’s a Tie”, “Player 1 Skipped Round”, “Player 2 Skipped Round”, “Both Players Skipped Round”. The player1Word and player2Word parameters are both type string. Assume input is always valid. This function should call on the function scrabblePoints to earn credit.
[No built-in function or method needed]
Examples:
player1Word = “PYTHON”
player2Word = “Pizza”
print(declareWinner(player1Word, player2Word))
returns:
Player 2 Wins!
print(declareWinner(player1Word))
returns:
Player 2 Skipped Round
In: Computer Science
Calculate the following
1) a. Give examples of each: A hex dword, a binary word, and
decimal byte
c. If x is a word, which command(s) are legal ?
movzx eax,x movzx ah,x movzx ax, x
d. How many bits in a word?
e. Put 12345h in DWORD format.
In: Computer Science
linux
use the command dmesg, use grep to filter and then redirect just the lines with the word Linux in them from the output generated by the dmesg command. redirect this output to a file at the path PutFileHere/Dmesgoutput.txt. What command did you use to do this, if there is no output choose a different word to grep for in the output of this command and substitute that word.
In: Computer Science
Write in detail about:
In: Nursing
In your own word, what do you understand by the word "Civilization"?
How many types of Constitutions can you think of?
In: Economics
In: Civil Engineering
Please the word surgery breakdown: 1. Provide the full term definition. 2. Identify and label the (p)prefix, (s)suffix, and (wr)word root for each term (if applicable). 3. Define each word part by providing the most basic Latin or Greek meaning provided in the dictionary.
sublingual, carcinogenic, cystocele, antenatal incision
In: Biology
Calculate the following issues in bit-level (signed values, two complement arithmetics)
a) 13 + 9 (use word lengths of 5 and 6 bits including the sign bit)
b) 11 – 17 (8-bit word length)
c) 9 * 5 (8-bit word length)
d) a-task using saturative arithmetics
In: Computer Science
In C
Exercise 8.1 A word is said to be “abecedarian” if the letters in the word appear in alphabetical order. For example, the following are all 6-letter English abecedarian words.
abdest, acknow, acorsy, adempt, adipsy, agnosy, be?st, behint, beknow, bijoux, biopsy, cestuy, chintz, de?ux, dehors, dehort, deinos, diluvy, dimpsy
a. Describe an algorithm for checking whether a given word (String) is abecedarian, assuming that the word contains only lower-case letters. Your algorithm can be iterative or recursive.
b. Implement your algorithm in a function called IsAbecedarian().
In: Mechanical Engineering
A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.
Ex: If the input is:
bob
the output is:
bob is a palindrome
Ex: If the input is:
bobby
the output is:
bobby is not a palindrome
Hint: Start by just handling single-word input, and submit for grading. Once passing single-word test cases, extend the program to handle phrases. If the input is a phrase, remove or ignore spaces.
IN JAVA
In: Computer Science