In the original flashcard problem, a user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting.
A sample session might run as follows:
Enter s to show a flashcard and q to quit: s Define: word1 Press return to see the definition definition1 Enter s to show a flashcard and q to quit: s Define: word3 Press return to see the definition definition3 Enter s to show a flashcard and q to quit: q
The flashcard program is required to be extended as follows:
Box 1 – Specification of extended problem
There are now two glossaries: the ‘easy’ and the ‘hard’.
The program should allow the user to ask for either an ‘easy’ or a ‘hard’ glossary entry. If the user chooses to see an ‘easy’ entry, the program picks an entry at random from the easy glossary and shows the entry. After the user presses return, the program should show the definition for that entry.
If the user chooses to see a ‘hard’ entry, the program picks an entry at random from the hard glossary and shows the entry. After the user presses return, the program should show the definition for that entry.
The user should be able to repeatedly ask for an easy or a hard entry or choose an option to quit the program.
A sample dialogue might run as follows. Changes from the original flashcard program are indicated by underlining. word3 is from the ‘easy’ glossary, word6 from the ‘hard’ glossary.
Enter e to show an easy flashcard, h to show a hard one, and q to quit: e Define: word3 Press return to see the definition definition3 Enter e to show an easy flashcard, h to show a hard one, and q to quit: h Define: word6 Press return to see the definition definition6 Enter e to show an easy flashcard, h to show a hard one, and q to quit: q
Box 2 – Keeping a notebook
As you work through part (a) of this question you should keep a notebook. You will need this for your answer to part (a)(vi). This should be very brief: it is simply a record of your personal experience while working on the task and what you feel you have learned from it.
In your notebook we suggest that you record the following information:
| How | A brief description of how you went about the task. |
| Resources | What documentation, if any, you consulted (including course materials and any online sources) and which you found most useful. There is no need for full references, just note the source, and – in the case of the course materials – what the relevant part and section or activity was. |
| Difficulties | Anything you found difficult about the task, and how you dealt with it. |
| Lessons learnt | Anything you learned from the task that would be useful if you faced a similar problem in the future. |
There is more than one way of solving the extended problem, but the approach we ask you to follow for this TMA starts by addressing the subproblem of showing a random entry from either the easy or the hard glossary and, after the user enters return, showing the definition. The algorithm should select which glossary to use depending on the user's input.
a.
The program should allow the user to ask for either an easy or a hard glossary. If the user chooses to see an easy entry, the program picks an entry at random from the easy glossary and shows the entry. After the user presses return, the program should show the definition for that entry.
If the user chooses to see a hard entry, the program picks an entry at random from the hard glossary and shows the entry. After the user presses return, the program should show the definition for that entry.
At this stage, no looping is involved and the steps of the algorithm only need to do what is asked for in the paragraph above and nothing more. Your algorithm will need to cater for the two variables of the user asking for either an easy or a hard entry.
The steps of your algorithm must be written in English and not use any Python code. The algorithm should be high-level and at a similar level of detail to the solution to Activity 2.24 of Block 3 Part 2, where an algorithm is given for show flashcard.
Modify the function show_flashcard() so it translates into Python the steps of the algorithm you wrote in Part (i). You can assume the user's choice is stored in the variable user_input and is either 'e' or 'h' for easy or hard respectively.
Make sure you write a suitable docstring for the function.
Copy your modified show_flashcard() function and paste it into your Solution Document.
Run the program and, when asked to make a choice, immediately enter q so the program quits.
Although the program has quit, the function is still loaded into memory and can be called from the shell. To test it, first set the value of user_input to 'e'
>>> user_input = 'e'
Now call the function
>>> show_flashcard()
If the function is correct, this should display one of the ‘easy’ words: word1, word2 or word3, followed by Press return to see the definition.
Repeat this process but this time set the value of user_input to 'h' and check that now the word displays one of the 'hard' words: word4, word5 or word6.
Debug the code and/or algorithm as necessary. If you need to make modifications, you should record them in your notebook.
Copy and paste two example tests into your Solution Document. The first test should show the result of user_input being set to 'e', the function being called, and the user pressing return. The second test should show the result of user_input being set to 'h', the function being called, and the user pressing return.
Alternatively, if you were unable to get the function working correctly, you should still paste in example tests and explain briefly how the results are different from what you were expecting.
If the user enters either ‘e’ or ‘h’, the show_flashcard() function should be called. The function will then show a random entry from either the easy or hard glossary, depending on which of the two the user chose, which will have resulted in user_input being set to the corresponding value.
If the user enters ‘q’, the program should quit as before.
If the user enters anything else, the program should print a message reminding them what the possible options are.
Once you have made the changes, run the whole program. Copy a test dialogue into your Solution Document to show the user first choosing to see an 'easy' entry, then a 'hard' one, then entering an invalid option, and finally entering 'q' to quit the program.
Alternatively, if you were unable to produce a test dialogue because you could not get the program to function as intended, you should briefly explain how a successful test dialogue would look.
In: Computer Science
Case Study: Furniture Fire [from McClave, Benson, and Sincich 1998] "A wholesale furniture retailer stores in-stock items at a large warehouse located in Tampa, Florida. In early 1992, a fire destroyed the warehouse and all the furniture in it. After determining the fire was an accident, the retailer sought to recover costs by submitting a claim to its insurance company."
"As is typical in a fire insurance policy of this type, the furniture retailer must provide the insurance company with an estimate of 'lost' profit for the destroyed items. Retailers calculate profit margin in percentage form using the Gross Profit Factor (GPF). By definition, the GPF for a single sold item is the ratio of the profit to the item's selling price measured as a percentage, i.e. Item GPF = (Profit/Sales price) x 100 Of interest to both the retailer and the insurance company is the average GPF for all of the items in the warehouse. Since these furniture pieces were all destroyed, their eventual selling prices and profit values are obviously unknown.
One way to estimate the mean GPF of the destroyed items is to use the mean GPF of similar, recently sold items. The retailer sold 3,005 furniture items in 1991 (the year prior to the fire) and kept paper invoices on all sales. Rather than calculate the mean GPF for all 3,005 items (the data were not computerized), the retailer sampled a total of 253 of the invoices and computed the mean GPF for these items. The 253 items were obtained by first selecting a sample of 134 items and then augmenting this sample with a second sample of 119 items. The mean GPFs for the two subsamples were calculated to be 50.6% and 51.0%, respectively, yielding an overall average GPF of 50.8%. This average GPF can be applied to the costs of the furniture items destroyed in the fire to obtain an estimate of the 'lost' profit." "
According to experienced claims adjusters at the insurance company, the GPF for sale items of the type destroyed in the fire rarely exceeds 48%. Consequently, the estimate of 50.8% appeared to be unusually high. (A 1% increase in GPF for items of this type equates to, approximately, an additional $16,000 in profit.) When the insurance company questioned the retailer on this issue, the retailer responded, 'Our estimate was based on selecting two independent, random samples from the population of 3,005 invoices in 1991. Since the samples were selected randomly and the total sample size is large, the mean GPF of 50.8% is valid.
A dispute arose between the furniture retailer and the insurance company, and a lawsuit was filed. In one portion of the suit, the insurance company accused the retailer of fraudulently representing their sampling methodology. Rather than selecting the samples randomly, the retailer was accused of selecting an unusual number of 'high profit' items from the population in order to increase the average GPF of the overall sample.
To support their claim of fraud, the insurance company hired a CPA firm to independently assess the retailer's 1991 Gross Profit Factor. Through the discovery process, the CPA firm legally obtained the paper invoices for the entire population of 3,005 items sold and input the information into a computer. The selling price, profit, profit margin, and month sold for these 3,005 furniture items are available" on the assignment page in Learning Suite (in Stata format), and are described on a page linked in Learning Suite.
Your objective in this case is to use these data to determine the likelihood of fraud. Is it likely that a random sample of 253 items selected from the population of 3,005 items would yield a mean GPF of at least 50.8%? Or, is it likely that two independent, random samples of size 134 and 119 will yield mean GPFs of at least 50.6% and 51.0%, respectively? (These were the questions posed to a statistician retained by the CPA firm.) Use the ideas of probability and sampling distributions to guide your analysis." You are working as clerk (with statistical expertise) for a judge (without statistical expertise).
Prepare a professional memo which presents the results of your analysis and gives your opinion regarding fraud. Be sure to describe the assumptions and methodologies used to arrive at your findings." Assume that your audience--the judge--has only a vague familiarity with statistics (i.e., he/she is a layperson)
Variable Type Description
Month QL month in which item was sold in 1991
Invoice QN Invoice Number
Sales QN Sales Price of item in dollars
Profit QN Profit amount of item in dollars
Margin QN Profit margin of item = (profit/Sales) * 100%
In: Economics
James, Kinkaid, the owner of the Kinkaid Company was convinced by Douglas Shaw, one of his employees, that a fellow worker, Dick Miller, had been stealing money from the company. During a break in the company's conference room, Kinkaid fired Miller in front of other workers, accused him of stealing from the company, searched through his briefcase over his objections, and finally forcibly escorted him to his office to await the arrival of the police, which he had his assistant summon. Miller was indicted for embezzlement but subsequently was acquitted upon establishing his innocence. What rights, if any, does Miller have against Kinkaid? Please discuss.
2. Sandra Davis was a worker in a New York hotel owned by the Royal Crown International Hotel Co. One day, Henry Lambert, the manager of the hotel support team, gathered all the workers and told them that a great deal of theft had taken place within the hotel. He warned the assembled workers that unless someone confessed or revealed the name of the responsible person, he would start to fire all the workers according to seniority. When no one volunteered the information he was seeking, Lambert fired Sandra Davis, a single parent of three small children. Ms Davis became very upset, began to cry, sustained emotional distress, mental anguish, and loss of wages and earnings.
Ms. Davis sued the Royal Crown International Hotel Co and Henry Lambert alleging that the defendants acted recklessly and outrageously, intending to cause emotional distress and anguish. The defendants argued that damages for emotional distress are not recoverable unless physical injury occurs as a result of the distress. Will Davis be successful on her complaint? Please explain.
3. Fred Banyon, the owner of a rural property, has a place on his land where he piles trash. The pile has been there for three months. Carl, a neighbor of the adjoining property, without Fred's consent or knowledge, threw his trash onto the trash pile. Fred discovered what Carl had done and sued. What tort, if any, has Carl committed? Please explain.
James, Kinkaid, the owner of the Kinkaid Company was convinced by Douglas Shaw, one of his employees, that a fellow worker, Dick Miller, had been stealing money from the company. During a break in the company's conference room, Kinkaid fired Miller in front of other workers, accused him of stealing from the company, searched through his brief case over his objections, and finally forcibly escorted him to his office to await the arrival of the police, which he had his assistant summon. Miller was indicted for embezzlement but subsequently was acquitted upon establishing his innocence. What rights, if any, does Miller have against Kinkaid? Please discuss.
2. Sandra Davis was a worker in a New York hotel owned by the Royal Crown International Hotel Co. One day, Henry Lambert, the manager of the hotel support team, gathered all the workers and told them that a great deal of theft had taken place within the hotel. He warned the assembled workers that unless someone confessed or revealed the name of the responsible person, he would start to fire all the workers according to seniority. When no one volunteered the information he was seeking, Lambert fired Sandra Davis, a single parent of three small children. Ms Davis became very upset, began to cry, sustained emotional distress, mental anguish, and loss of wages and earnings.
Ms. Davis sued the Royal Crown International Hotel Co and Henry Lambert alleging that the defendants acted recklessly and outrageously, intending to cause emotional distress and anguish. The defendants argued that damages for emotional distress are not recoverable unless physical injury occurs as a result of the distress. Will Davis be successful on her complaint? Please explain.
3. Fred Banyon, the owner of a rural property, has a place on his land where he piles trash. The pile has been there for three months. Carl, a neighbor of the adjoining property, without Fred's consent or knowledge, threw his trash onto the trash pile. Fred discovered what Carl had done and sued. What tort, if any, has Carl committed? Please explain.
In: Psychology
A Meritorious Plan?
There are many ways that organizations can organize their pay plans; indeed, pay policies have been found to be one of the biggest differences between organizations. While it is usually a good idea to link pay and performance in some way, there are different approaches that can achieve this goal. Some companies prefer to link compensation strongly to individual performance, while others rely more heavily on team rewards.
In this exercise, please read the following min-case and answer the questions that follow.
Compu-Globo is an online marketing strategy company in Beachwood, Ohio. Three years after its founding, President Nick Morlan is ready to start hiring staff, as the company has expanded past the point where its two founders can keep up with customer demand. As a result, it will need to hire two marketing consultants and a graphic designer. Because Compu-Globo has never hired employees before, it is starting from scratch with regard to its pay policies. In college, Nick learned about various types of pay-for-performance schemes and is interested in developing one for use in his business. He knows about merit pay, which increases each employee's salary based on his or her individual performance. He also has experience with profit sharing from a previous job, in which employees receive bonuses based on the company's financial results.
While business has been good, cash is still tight and he is concerned with his company's ability to pay large salaries if market conditions affect demand. He is also unsure of his abilities to set up a well-developed performance system. The new staff will be required to work together on projects; the graphic designer in particular will have to cooperate with both the new hires and the founders of the company on a regular basis. Nick expects that the new hires will become an integral part of the company; he is more than doubling the staff and it will still only consist of five people total. The performance of each employee will have a substantial impact on the business's overall results.
While Nick can (and will) use multiple kinds of incentive pay, he will need to choose one to emphasize as he interviews, selects, and negotiates with new staff.
16.
value:
2.00 points
Which of these policies is most likely to lead to individual competition among Compu-Globo's new hires?
Profit sharing
Merit pay
Skill based
Gainsharing
References
Multiple ChoiceLearning Objective: 12-02 Describe the fundamental pay programs for recognizing employees' contributions to the organization's success.
Difficulty: 2 MediumLearning Objective: 12-03 List the advantages and disadvantages of the pay programs.
17.
value:
2.00 points
What will happen to the cost of a merit pay plan if Compu-Globo's business suffers?
He will still have to increase salaries if individual performance is good
It depends on the value of the company at that time
Payments will be reduced along with sales
18.
value:
2.00 points
Why is it important for Nick to have a well-developed performance appraisal system if merit pay is a substantial component of compensation?
Federal law has enacted legislation that requires employers to provide it
Merit pay increases are based on assessments of individual performance; the stakes of the appraisal are high with this system
Because individual appraisals and merit increases determine profit sharing outcomes
19.
value:
2.00 points
Which of these is a reason that Compu-Globo's employees might not be motivated by a profit-sharing plan?
If they feel that they have no impact on the overall results
If they pay out during the current time period, instead of being deferred
If it requires them to behave like owners, by doing what it takes to make the organization more effective
20.
value:
2.00 points
Which of these is most amenable to incentive pay, if Nick decides to go that route?
Jobs with significant interdependence on other employees
Jobs that are peripheral to the mission of the organization
Jobs in which performance can be measured as individual output, productivity, and sales
In: Operations Management
A motion picture industry analyst is studying movies based on epic novels. The following data were obtained for 10 Hollywood movies made in the past five years. Each movie was based on an epic novel. For these data, x1 = first-year box office receipts of the movie, x2 = total production costs of the movie, x3 = total promotional costs of the movie, and x4 = total book sales prior to movie release. All units are in millions of dollars.
| x1 | x2 | x3 | x4 |
| 85.1 | 8.5 | 5.1 | 4.7 |
| 106.3 | 12.9 | 5.8 | 8.8 |
| 50.2 | 5.2 | 2.1 | 15.1 |
| 130.6 | 10.7 | 8.4 | 12.2 |
| 54.8 | 3.1 | 2.9 | 10.6 |
| 30.3 | 3.5 | 1.2 | 3.5 |
| 79.4 | 9.2 | 3.7 | 9.7 |
| 91.0 | 9.0 | 7.6 | 5.9 |
| 135.4 | 15.1 | 7.7 | 20.8 |
| 89.3 | 10.2 | 4.5 | 7.9 |
(a) Generate summary statistics, including the mean and standard deviation of each variable. Compute the coefficient of variation for each variable. (Use 2 decimal places.)
| x | s | CV | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| x1 | % | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| x2 | % | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| x3 | % | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| x4 |
% (b) For each pair of variables, generate the correlation coefficient r. Compute the corresponding coefficient of determination r2. (Use 3 decimal places.)
|
In: Statistics and Probability
12.Which of the following statements holds true for the term, skill theft?
Select one:
a. It refers to taking specific, job-related abilities acquired at one organization to another, especially a competitor.
b. It refers to a situation where an employee moves to a new organization and helps it appropriate the former organization’s market segment.
c. It refers to the use of company working hours for activities unrelated to work, including looking for a job elsewhere.
d. It refers to a situation where an employee moves to a new organization and helps it appropriate the former organization’s client base.
e. It refers to the use of an organization’s equipment for activities unrelated to work, including looking for a job elsewhere.
13.In the morning rush hour, John, a bicycle courier boy, skids off his cycle and is unable to get up. A number of people pass him, but do not stop to help him because if they did so, they would get late for school or work. Martha, who is also getting late for an appointment, sees John in pain and stops her car, helps him get up and drives him to a nearby clinic. Martha’s act of helping John is an example of:
Select one:
a. product sincerity.
b. cultural imperialism.
c. laissez faire.
d. objectification.
e. Samaritanism.
14._____ refers to a situation in business in which decisions are made on the basis of personal relationships and loyalties more than unbiased judgments and purely professional considerations.
Select one:
a. Regulatory capture
b. Kleptocracy
c. Patrimonialism
d. Crony capitalism
e. Supercapitalism
In: Accounting
Great Adventures Problem 9-1 Tony’s favorite memories of his childhood were the times he spent with his dad at camp. Tony was daydreaming of those days a bit as he and Suzie jogged along a nature trail and came across a wonderful piece of property for sale. He turned to Suzie and said, “I’ve always wanted to start a camp where families could get away and spend some quality time together. If we just had the money, I know this would be the perfect place.” They called several banks and on January 1, 2020, Great Adventures obtained a $560,000, 6%, 10-year installment loan from Summit Bank. Payments of $6,217 are required at the end of each month over the life of the 10-year loan. Each monthly payment of $6,217 includes both interest expense and principal payments (i.e., reduction of the loan amount). Late that night Tony exclaimed, “$560,000 for our new camp, this has to be the best news ever.” Suzie snuggled close and said, “There’s something else I need to tell you, Tony, I’m expecting!” They decided right then, if it was a boy, they would name him Venture. Required: 1. Complete the first three rows of an amortization table.
2. Record the note payable on January 1, 2020, and the first two payments on January 31, 2020, and February 28, 2020. (If no entry is required for a particular transaction, select "No journal entry required" in the first account field.)
Record the issuance of note payable.
Record the monthly payment.
In: Accounting
1. A 2-year-old child is being held in the parent’s lap to have his blood drawn by venipuncture. Every time you get close to the child, he pulls away from you. He watches you carefully as you get your equipment ready. The receptionist is willing to help, but she cannot draw blood. What would be a good way to make this a successful venipuncture?
2. A 12-year-old boy is sitting in the phlebotomy chair and starts screaming that he does not want his blood drawn. The parents are in the room with you and observe the child’s behavior. There are many patients in the waiting room who can hear the child screaming. Luckily, you have several other phlebotomists at this location. How do you handle the situation?
3. A GTT is being conducted on a patient. One phlebotomist collects the samples using a finger puncture, and the other phlebotomist collects the samples with a venipuncture. How will this cause a problem with the sequential results?
4. A phlebotomist is to collect a post-dose level on a patient at 10:30. The phlebotomist is delayed in the collection and collects the sample at 11:00. To hide the fact that he was late for the collection, the phlebotomist enters 10:30 as the collection time. How will this affect the treatment of the patient?
5. A patient arrives to submit a sample for a chain of custody urine test. Upon entering the restroom, the patient says her 10-year-old daughter must go into the restroom with her because the child is afraid to be left alone. How should you handle this situation?
In: Nursing
This is my review study guide for my biology final can someone please answer them so i can study. Thank you
In: Biology
In this problem, we assume that the odds of giving birth to a girl or to a boy are 1 2 each. We consider a country in which, because of tradition and particular socio-economic circumstances, parents give birth to children until they give birth to their first son, at which point they stop having children. The point of the problem is to evaluate the proportion of children who are boys in a given generation. We will do this in several steps. A (3 Points) Let X be the random variable corresponding to the number of children of a given couple chosen at random in the population. What is the probability mass function of X? Verify that E[X] = 2 and Var(X) = 2 with the formulas provided at the beginning of this exam.
B (3 Points) We now assume that in the country, there are N couples who can have children, and for a given couple i, we call Xi the random variable corresponding to the number of children this couple will have. Let P be the random variable corresponding to the fraction of boys among all children. Express P in terms of X1, X2,. . . ,XN and N. Then write P in terms of the sample mean XN defined by XN = X1 +X2 +...+XN N C (2 Points) Assume the Xi are independent random variables. What is the expected value of XN and what is the variance of XN? D (4 Points) Assume N is large enough that the answer to the problem is well approximated by taking the limit N → +∞. What does the law of large numbers tell us about X
In: Statistics and Probability