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
Please do the second function only. I just needed to add the first function for reference
In: Computer Science
Which of the following electron jumps in a hydrogen atom emits the photon of highest frequency?
a) n=2 to n=3
b) n=1 to n=2
3) n=3 to n=2
4) n=2 to n=1
In: Physics
26. a. (7 pts) Match elements of a eukaryotic gene shown above, with correct statement.
1. Eukaryotic Gene ____ A. Composed of RNA
2. Exon ____ B. Composed of DNA
3. Intron ____ C. RNA Polymerase binds here for transcription initiation
4. Promoter _____ D. Binding site for protein which is an activator of transcription
5. Translation initiation site ____ E. Three nucleotides which code for one amino acid
6. Codon ____ F. Non coding region of gene; removed after transcription
7. Enhancer _____ G. Contains an ATG codon
H. Segment of gene which codes for segment of encoded protein
b. (3 pts) Choose three of the above elements which are also present in a prokaryotic gene:
Element 1 ____ Element 2 ____ Element 3 ____
27. (2 pts) Place the following steps in cloning human insulin DNA into bacteria in correct order:
1. Use transformation to deliver new recombinant DNA to bacterial cells
2. Use restriction enzyme from step 3 to cut bacterial plasmid. Then add cut human insulin cDNA
3. Cut human insulin cDNA at each end with restriction enzyme
4. Convert human insulin mRNA to human insulin cDNA using the enzyme reverse transcriptase
5. Allow the enzyme DNA ligase to seal the new gene in to the vector (bacterial plasmid)
6. Allow bacterial cells to replicate and produce insulin.
a. 4, 3, 2, 5, 6, 1 b. 3, 2, 4, 5, 6, 1 c. 2, 3, 4, 5, 1, 6 d. 1, 3, 2, 4, 5, 6 e. 4, 3, 2, 5,1, 6
28. (2 pts) Blue/White screening is used to screen bacterial colonies in gene cloning methods. Which bacterial colony is selected for expression of a gene?
a. A white colony. These bacteria do not have Ampicillin resistance.
b. A blue colony. These bacteria express the foreign gene inserted into the plasmid.
c. A white colony. These bacteria do not express the LacZ gene.
d. A blue colony. These bacteria do not express the LacZ gene.
In: Biology
Which of the following solutions would have the highest pH? Assume that they are all 0.10 M in acid at 25C. The acid is followed by its Ka value.
1) HF, 3.5 × 10-4
2) HCHO2, 1.8 × 10-4
3) HNO2, 4.6 × 10-4
4) HCN, 4.9 × 10-10
5) HClO2, 1.1 × 10-2
In: Chemistry
Two firms set prices in a market with demand curve Q = 6 − p, where p is the lower of the two prices. If firm 1 is the lower priced firm, then it is firm 1 that meets all of the demand; conversely, the same applies to firm 2 if it is the lower priced firm. For example, if firms 1 and 2 post prices equal to 2 and 4 dollars, respectively, then firm 1–as the lower priced firm–meets all of the market demand and, hence, sells 4 units. If the two firms set the same price p, then they each get half of the market, that is, they each get (6−p )/2 . Suppose that prices can only be quoted in dollar units, such as 0, 1, 2, 3, 4, 5, or 6 dollars. Suppose, furthermore, that costs of production are zero for both firms. Finally, suppose that firms want to maximize their own profits.
Show that when we restrict attention to the prices 1,2, and 3 dollars, the (monopoly) price of 3 dollars is a dominated strategy.
In: Economics
Create a function called merge that takes two int vectors (x and y) as argument and returns an int vector (z) that is the result of merging the two vectors x and y. Here is an example to explain how the merge function works: If the vector x has the following values: 1 2 3 4 5, and the vector y has the following: 6 7 8 9 10 11 12, then the merging vector z will have: 1 6 2 7 3 8 4 9 5 10 11 12. This means: z[0] = x[0], z[1]=y[0], z[2]=x[1], z[3]=y[1], z[4]=x[2], z[5]=y[2],... If the size of the vector x is bigger than the size of the vector y, when x is entirely copied to z, the rest of x will be copied next. If y is bigger, the rest of y is copied when x is entirely copied to z.
Language: c++
In: Computer Science
In: Accounting
| Admin | Experience | Complexity | Performance |
|---|---|---|---|
| 1 | 26 | 1 | 45 |
| 2 | 32 | 3 | 78 |
| 3 | 8 | 3 | 120 |
| 4 | 60 | 2 | 68 |
| 5 | 72 | 5 | 140 |
| 6 | 20 | 5 | 135 |
Question 1. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 1?
Question 2. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 2?
Question 3. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 3?
Question 4. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 4?
Question 5. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 5?
Question 6. What is the predicted performance time(rounding to the nearest 10th decimal) for administrator 6?
In: Statistics and Probability
The company makes three components which are processed on two machines: a shaper and a grinder. The times (in minutes) required on each machine are as follows:
| Component | Shaper | Grinder |
| 1 | 6 | 4 |
| 2 | 4 | 5 |
| 3 | 4 | 2 |
The shaper is available for 120 hours, and the grinder is available for 110 hours. No more than 400 units of component 3 can be sold, but up to 1200 units of each of the other components can be sold. The company already has orders for 800 units of component 1 that must be satisfied. The profit contributions for components 1, 2, and 3 are $10, $8 and $11, respectively.
Formulate the spreadsheet model and solve for the recommended production quantities.
a. Component 1:
b. Component 2:
c. Component 3:
d. If one more minute could be made available on the
shaper, how much would it be worth?
(integer value only, no symbols)
In: Statistics and Probability
1. What do we mean by a "production function"? Interpret the following production functions. (a) Q = 50L^3/4 K^1/4 (b) Q = 640K L^2-K^2L^3
In: Economics