I need to write a program and can't seem to make it run properly.
Someone can help with the coding? It's with python
Thanks!
Here is the program:
The rules of Shut the Box are as follows (abbreviated
version):
+ You have two 5-sided die
+ You have 5 wooden blocks (labeled 1 through 5)
+ Each turn, you roll the dice and knock down the blocks
corresponding to the number on each die + You have to knock down
one block every turn. If you can’t, you lose
+ You may knock down two blocks in your turn (e.g. if you roll a
3 and a 5 you can knock them both down)
+ You must knock down every single block to win
+ Rounds continue until either 1) all blocks are knocked down (you
win!) or 2) you don't knock any blocks down in a given round (you
lose!)
Use those criteria to write a Shut the Box program that displays what turn it is, rolls the dice, knocks down blocks, and displays whether the user won or loss.
Your program should have the following functions:
1. main: Begins program execution: display "Let's play Shut the Box!". Initialize five block variables all to False (representing the blocks standing up at the beginning of the game). Display the current turn (e.g. Turn: 1, Turn: 2, etc.). Call the roll_die function twice to get values for the round, then display the values rolled (e.g. "You rolled a 5 and a 3"). Process the dice values by checking to see if the block associated with the value rolled is currently standing (False) or knocked down (True). If the block is False, flip it to True (you knocked it down). Make sure to keep track of the number of die being used in a given round, because if you don't knock any blocks down in a round you lose!
2. has_won: receives all five blocks as parameter variables (Booleans) and checks whether each block is True or False (False = block is standing, True = block has been knocked down). If a block is False, return False. If all blocks are True, return True (meaning they are all knocked down, thus you won).
3. roll_die: simulates rolling of a virtual die. Returns a single random integer between 1 and 5 (inclusive).
1
Hints:
+ The five variables representing the blocks should be Booleans.
Initialize them all to be False (standing up), then flip them to
True as they get knocked down.
+ Need to define a number of turns variable that gets incremented
(added to) each turn
+ Need to keep track of the number of die not used in that turn
+ If both die are not used (e.g. num_die_not_used == 2) in a given round, the game is over (no blocks were knocked down)
Your program should match the provided sample runs below:
Let's play Shut the Box! Turn: 1 You rolled a 5 and a 3 You knocked down block 3 You knocked down block 5 Turn: 2
You rolled a 2 and a 4
You knocked down block 2
You knocked down block 4
Turn: 3
You rolled a 5 and a 4
You lost in 3 turns, better luck next time.
Let's play Shut the Box! Turn: 1 You rolled a 5 and a 5 You knocked down block 5 Turn: 2
You rolled a 1 and a 3 You knocked down block 1 You knocked down block 3 Turn: 3 You rolled a 1 and a 4 You knocked down block 4 Turn: 4 You rolled a 2 and a 2 You knocked down block 2 Congrats, you won in 4 turns!
In: Computer Science
QualSupport Corporation manufactures seats for automobiles,
vans, trucks, and various recreational vehicles. The company has a
number of plants around
the world, including the Denver Cover Plant, which makes seat
covers. Ted Vosilo is the plant manager of the Denver Cover Plant
but also serves as the
regional production manager for the company. His budget as the
regional manager is charged to the Denver Cover Plant. Vosilo has
just heard that QualSupport has received a bid from an outside
vendor to supply the equivalent of the entire annual output of the
Denver Cover Plant for $35 million. Vosilo was astonished at the
low outside bid because the budget for the Denver Cover Plant’s
operating costs for the upcoming year was set at $52 million. If
this bid is accepted, the Denver Cover Plant will be
closed down.
The budget for Denver Cover’s operating costs for the coming year is presented below.
Denver Cover Plant
Annual Budget for Operating Costs
Materials $ 14,000,000
Labor:
Direct $ 13,100,000
Supervision 900,000
Indirect plant 4,000,000 18,000,000
Overhead:
Depreciation—equipment 3,200,000
Depreciation—building 7,000,000
Pension expense 5,000,000
Plant manager and staff 800,000
Corporate expenses* 4,000,000 20,000,000
Total budgeted costs $52,000,000
*Fixed corporate expenses allocated to plants and other operating units based on total budgeted wage and salary costs.
a. Due to Denver Cover’s commitment to using high-quality fabrics in all of its products, the Purchasing Department was instructed to place blanket purchase orders with major suppliers to ensure the receipt of sufficient materials for the coming year. If these orders are canceled as a consequence of the plant closing, termination charges would amount to 20% of the cost of direct materials.
b. Approximately 400 plant employees will lose their jobs if the plant is closed. This includes all of the direct laborers and supervisors as well as the plumbers, electricians, and other skilled workers classified as indirect plant workers. Some would be able to find new jobs while many others would have difficulty. All employees would have difficulty matching Denver Cover’s base pay of $18.80 per hour, which is the highest in the area. A clause in Denver Cover’s contract with the union may help some employees; the company must provide employment assistance to its former employees for 12 months after a plant closing. The estimated cost to administer this service would be $1.5 million for the year.
c. Some employees would probably choose early retirement because Qual Support has an excellent pension plan. In fact, $3 million of the annual pension expense would continue whether Denver Cover is open or not.
d. Vosilo and his staff would not be affected by the closing of Denver Cover. They would still be responsible for administering three other area plants.
e. If the Denver Cover Plant were closed, the company would realize about $3.2 million salvage value for the equipment and building. If the plant remains open, there are no plans to make any significant investments in new equipment or buildings. The old equipment is adequate and should last indefinitely.
Required:
2. QualSupport Corporation plans to prepare a financial analysis that will be used in deciding whether or not to close the Denver Cover Plant. Management has asked you to identify:
a. The annual budgeted costs that are relevant to the decision regarding closing the plant.
Materials $
Labor:
Direct $
Supervision
Indirect plant
Differential pension cost
Total annual relevant costs $
b. The annual budgeted costs that are not relevant to the decision regarding closing the plant.
Depreciation—equipment $
Total annual continuing costs $
c. Any nonrecurring costs that would arise due to the closing of the plant.
Termination charges on canceled material orders $
Total nonrecurring costs $
3. Looking at the data you have prepared in (2) above,
a. Calculate the Net advantage (disadvantage) of closing the plant.
First year Other Years
$
Salvage value of equipment and building 3,200,000
Net advantage (disadvantage) of closing the plant
b. Should the plant be closed?
Yes___________
No ___________
In: Accounting
Item 1
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
To summarize, the elaboration model of instruction starts by presenting knowledge at a very general or simplified level in the form of a special kind of overview. Then it proceeds to add detail or complexity in "layers" across the entire breadth of the content of the course (or curriculum), one layer at a time, until the desired level of detail or complexity is reached. References: |
They soon switched to a model based on the elaboration theory (Reigeluth, 1999). Using this approach, the game would begin with a level that offered the simplest version of the whole task (the epitome); subsequent levels would become increasingly more complex--an approach common to videogames--with opportunities for review and synthesis. References: |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 2
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
Other major issues involve the accepted methods by which fidelity is measured. There are two major methods described in the literature for fidelity measurement. The first is through mathematical measurement that calculates the number of identical elements shared between the real world and the simulation; the greater the number of shared identical elements, the higher the simulation fidelity. A second method to measure fidelity is through a trainees' performance matrix. References: |
Liu et al. (2009) identified two major methods for measuring fidelity. The first is a mathematical (objective) method that requires counting "the number of identical elements shared between the real world and the simulation; the greater the number of shared identical elements, the higher the simulation fidelity" (p. 62). The second method involves a performance matrix that compares a human's performance in the simulation with that person's real-world performance, producing an indirect measure of fidelity. References: |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 3
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
Educational researchers, policymakers, and practitioners agree that educational research is often divorced from the problems and issues of everyday practice--a split that creates a need for new research approaches that speak directly to problems of practice (National Research Council [NRC], 2002) and that lead to the development of "usable knowledge" (Lagemann, 2002). Design-based research (Brown, 1992; Collins, 1992) is an emerging paradigm for the study of learning in context through the systematic design and study of instructional strategies and tools. We argue that design-based research can help create and extend knowledge about developing, enacting, and sustaining innovative learning environments. References: |
A decade later, researchers interested in studying learning in naturalistic settings (inspired by Brown's approach) began a concerted effort to define the standards and argue the legitimacy of this type of research through design. For example, the Design-Based Research Collective defined design-based research (DBR) as "an emerging paradigm for the study of learning in context, through the systematic design and study of instructional strategies and tools" (DBRC, 2003, p. 5). References: |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 4
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
The study of learning derives from essentially two sources.Because learning involves the acquisition of knowledge, the first concerns the nature of knowledge and how we come to know things.... The second source in which modern learning theory is rooted concerns the nature and representation of mental life. References: |
The study of learning derives from essentially two sources. The first concerns the nature of knowledge and how we come to know things. The second source concerns the nature and representation of mental life.
|
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 5
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
In examining the history of the visionary companies, we were struck by how often they made some of their best moves not by detailed strategic planning, but rather by experimentation, trial and error, opportunism, and--quite literally--accident. What looks in hindsight like a brilliant strategy was often the residual result of opportunistic experimentation and "purposeful accidents." References: |
When I look back on the decisions I've made, it's clear that I made some of my best choices not through a thorough analytical investigation of my options, but instead by trial and error and, often, simply by accident. The somewhat random aspect of my success or failure is, at the same time, both encouraging and scary. |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 6
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
A communication channel is the means by which messages get from one individual to another.The nature of the information-exchange relationship between a pair of individuals determines the conditions under which a source will or will not transmit the innovation to the receiver and the effect of such a transfer. References: |
Rogers places great importance on the sharing of information about an innovation. He defines a communication channel as "the means by which messages get from one individual to another" (p. 18). He describes two general media channels of communication: mass media and interpersonal; and two scopes of channels: localite and cosmopolite. References: |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 7
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
The philosophical position known as constructivism views knowledge as a human construction. The various perspectives within constructivismare based on the premise that knowledge is not part of an objective, external reality that is separate from the individual. Instead, human knowledge, whether the bodies of content in public disciplines (such as mathematics or sociology) or knowledge of the individual learner, is a human construction. References: |
Does knowledge exist outside of, or separate from, the individual who knows? Constructivists argue that "... human knowledge, whether the bodies of content in public disciplines (such as mathematics or sociology) or knowledge of the individual learner, is a human construction." References: |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 8
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
Precedent is also described as "the unique knowledge embedded in a known design" (Oxman, 1994, p. 146), meaning, in everyday terms, that the memory of having experienced an existing design is a memory that contains special forms of knowledge... At heart, the design case is a description of a real artifact or experience that has been intentionally designed. A case may be as minimal as an individual image of a commercial product, a building, an advertisement, a classroom or anything else designed; these forms of design cases appear in hundreds of magazines, design annuals, competition catalogs, display books, web portfolios and similar venues. References: Boling, E. (2010). The need for design cases: Disseminating design knowledge. International Journal of Designs for Learning, 1 (1), 1-8. |
According to Boling (2010, p. 2), "At heart, the design case is a description of a real artifact or experience that has been intentionally designed." She explains that the primary goal of a design case is to provide designers with precedent--defined by Oxman as "the unique knowledge embedded in a known design" (as quoted in Boling, 2010, p. 2). She further explains that expert designers are aware of numerous precedents which may be helpful in future designs. For example, educational game designers can view unique cases of game designs as precedents, which, in turn, may facilitate design of new games. References: Boling, E. (2010). The need for design cases: Disseminating design knowledge. International Journal of Designs for Learning, 1 (1), 1-8. |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 9
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
The study of learning derives from essentially two sources.Because learning involves the acquisition of knowledge, the first concerns the nature of knowledge and how we come to know things.... The second source in which modern learning theory is rooted concerns the nature and representation of mental life. References: |
Driscoll (2000) concludes that "the study of learning derives from essentially two sources... The first concerns the nature of knowledge and how we come to know things.... The second ... concerns the nature and representation of mental life" (p. 10).
|
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
Hints
Item 10
In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism by clicking the appropriate radio button.
|
Original Source Material |
Student Version |
|
It is helpful to think in terms of two basic kinds of change: piecemeal and systemic. Piecemeal change leaves the structure of a system unchanged. It often involves finding better ways to meet the same needs, such as using an analogy to help your students learn the science concepts you taught in an otherwise similar manner last year. In contrast, systemic change entails modifying the structure of a system, usually in response to new needs. References: |
Reiguleth (1999) mentions two different kinds of change: Piecemeal and Systemic change. Systemic change entails modifying the structure of a system, in order to meet new needs. In contrast, piecemeal change leaves the structure of a system unchanged. For example, new innovations instead of traditional methods could be used to engage students in learning. |
Which of the following is true for the Student Version above?
Word-for-Word plagiarism
Paraphrasing plagiarism
This is not plagiarism
In: Psychology
On June 15, 2018, Sanderson Construction entered into a
long-term construction contract to build a baseball stadium in
Washington, D.C., for $310 million. The expected completion date is
April 1, 2020, just in time for the 2020 baseball season. Costs
incurred and estimated costs to complete at year-end for the life
of the contract are as follows ($ in millions):
| 2018 | 2019 | 2020 | |||||||
| Costs incurred during the year | $ | 70 | $ | 60 | $ | 30 | |||
| Estimated costs to complete as of December 31 | 130 | 30 | — | ||||||
Required:
1. Compute the revenue and gross profit will
Sanderson report in its 2018, 2019, and 2020 income statements
related to this contract assuming Sanderson recognizes revenue over
time according to percentage of completion.
2. Compute the revenue and gross profit will
Sanderson report in its 2018, 2019, and 2020 income statements
related to this contract assuming this project does not qualify for
revenue recognition over time.
3. Suppose the estimated costs to complete at the
end of 2019 are $120 million instead of $30 million. Compute the
amount of revenue and gross profit or loss to be recognized in 2019
using the percentage of completion method.
Compute the revenue and gross profit will Sanderson report in its 2018, 2019, and 2020 income statements related to this contract assuming Sanderson recognizes revenue over time according to percentage of completion. (Enter your answers in millions. Loss amounts should be indicated with a minus sign. Use percentages as calculated and rounded in the table below to arrive at your final answer.)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Compute the revenue and gross profit will Sanderson report in its 2018, 2019, and 2020 income statements related to this contract assuming this project does not qualify for revenue recognition over time. (Enter your answers in millions. Loss amounts should be indicated with a minus sign.)
|
|||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Your friend, Jane Lee, recently won the Lotto Max and is planning to sell her business and move to England. Jane owns the Vancouver Running Centre Inc. (Centre) that offers training and running clinics. She has provided you with the trial balance for the year ended October 31, 2018 (the company’s year-end).
Vancouver Running Centre Inc.
Unadjusted Trial Balance
October 31, 2020
|
Account Name |
Trial Balance |
||||
|
DR |
CR |
||||
|
Cash |
$ 43,000 |
||||
|
Accounts Receivable |
25,000 |
||||
|
Inventory |
54,000 |
||||
|
Supplies |
2,500 |
||||
|
Prepaid Insurance |
4,800 |
||||
|
Computer equipment |
52,000 |
||||
|
Accumulated Depreciation |
6,000 |
||||
|
Bank loan |
$ 15,000 |
||||
|
Accounts Payable |
17,000 |
||||
|
Unearned Revenue |
30,000 |
||||
|
Common Shares |
25,000 |
||||
|
Retained Earnings |
0 |
||||
|
Dividends Declared |
15,000 |
||||
|
Revenue earned |
320,300 |
||||
|
Cost of goods sold |
47,000 |
||||
|
Wage expense |
78,000 |
||||
|
Interest expense |
5,000 |
||||
|
Advertising expense |
7,500 |
||||
|
Depreciation expense |
2,000 |
||||
|
Telephone expense |
8,000 |
||||
|
Rent expense |
60,000 |
||||
|
Supplies expense |
9,500 |
||||
|
Total |
$413,300 |
$413,300 |
|||
Required:
She has asked you to review the trial balance and the additional information and prepare any adjusting journal entries you believe are necessary to ensure the accounts are complete and accurate in accordance with Generally Accepted Accounting Principles. Place your responses together with supporting calculations in the table provided. Explanations are not required.
1) The computer equipment is in excellent shape. It was purchased on July 1, 2019 and is expected to have a useful life of 4 years at which time it is expected to be sold for $4,000.
2) On February 1, 2020, Centre received and recorded in Revenue Earned a $20,000 cash advance from the Richmond School Board. The payment covers marathon training for the eight-month period starting July 1, 2020.
3) Each of Centre’s employees is paid $1,500 every two weeks – i.e.10 days of work. The six employees did not receive a pay cheque for the last seven working days of October 2020, as the bookkeeper was ill. The amounts were both recorded and paid upon her return on November 4, 2020.
6) On January 1, 2020 Centre purchased a two-year liability insurance policy for $4,800.
7) A letter from Centre’s landlord dated October 25, 2020 demands a total of $18,000 to be paid to cover the rent for the months of September to November 2020 inclusive. Centre’s monthly rent expense has been constant for the past three years.
8) Supplies on hand at October 31, 2020 are estimated at $3,500.
In: Accounting
P. 5-1
Transactions may have significantly different impacts on a government's budget, governmental funds statements, and government‐wide statements.
A school district prepares its budget on a cash basis. It is contemplating the changes or actions that follow. For each, indicate the impact that the change would have (1) on year‐ending June 30 2020, general fund expenditures or transfers and (2) on year‐ending June 30, 2020, government‐wide expenses (e.g., “increase expenditures by $X” or “no impact”). Provide a brief explanation of your response, indicating that you are aware of the relevant financial reporting issue.
I need copy and paste thx
In: Accounting
7-41: Departmental cost allocation insurance company: Comprehensive insurance company has two product lines ; health insurance and auto insurance. The two product lines are served by three operating departments which are necessary for providing the two types of products: claims processing, administration, and sales. These three operating departments which are necessary for providing the two types of products:claims processing, administration, and sales. These three operating departments are supported by two departments: infromation technology and operations. The support provided by information technology and operations to the other departments is shown below.
Support departments
Information technology operations
information --- 20%
Operations 10% ___
Operating Department
Claims processing Administration sales
Infromation 20% 40% 20%
operations 10 50 30
Use 4 or more decimal places(e.g., 33.3333%) in your calculations. Allocate the $4,350,000 total departmental costs to the three operating departments using a.) direct method only.
In: Accounting
From the given information in each case below, use technology to find the P-value for a chi-square test and give the conclusion for a significance level of α = 0.01. (Use technology to calculate the P-value. Round your answers to three decimal places.)
(a)
χ2 = 7.4, df = 2
P-value =
State the conclusion.
Reject H0.Fail to reject H0.
(b)
χ2 = 13.1, df = 6
P-value =
State the conclusion.
Reject H0.Fail to reject H0. =
(c)
χ2 = 17.7, df = 9
P-value =
State the conclusion.
Reject H0.Fail to reject H0.
(d)
χ2 = 21.2, df = 4
P-value =
State the conclusion.
Reject H0.Fail to reject H0.
(e)
χ2 = 6.2, df = 3
P-value =
State the conclusion.
Reject H0.Fail to reject H0.
You may need to use the appropriate table in the appendix or technology to answer this question.
In: Statistics and Probability
How can you resolve this case study by using R studio from chapter 10 , book business statistics written by Jaggia/Kelly third edition.can you please resolve for me
Case study 10.1
Chad perrone is a financial analyst Boston studying the annual return data for the health and information technology industries. He randomly samples 20 firms in each industry and notes each firm’s annual return. A portion of the data is shown in the accompanying table.
Data for Case Study 10.1 Annual Returns (in percent) for Firms in Health and Information Technology Industries
|
Health |
Information Technology |
|
10.29 |
4.77 |
|
32.17 |
1.14 |
|
. . . |
. . . |
|
13.21 |
22.61 |
In a report, use the sample information to
In: Statistics and Probability
The concerns about the impact of technology on our lives are growing. There have been recent research reports about the negative impact of digital technology usage on stress, work productivity, happiness, and overall well-being. In light of these concerns, a polling organization asked technology experts about their opinion on our digital life and found that 29% of the experts believe that in the future our lives will be more harmed than helped by their digital environment. In an effort to confirm these results, a local tech company decides to ask 190 randomly selected customers their opinions about their digital life. Answer parts a through c below.
A. What is the probability that 35 or more people from this sample are concerned about the digital environment?
The probability is =
(Round to four decimal places)
B. What is the probability that 45 or more people from this sample are concerned about the digital environment?
The probability is =
(Round to four decimal places)
(please round to the correct decimal places)
In: Statistics and Probability