2. You have a candy bowl containing one of each of the following 5 candy bars:...
Question #2 A bowl of candy contains many pieces of candy, but only six different types of candy. How many ways can three pieces of candy be removed from the bowl? (Assume you can remove one or more pieces of the same type of candy.)
For this lab, you will be writing search algorithms. I have provided method signatures for you to follow. The code I am providing already compiles, so as you write more code you can continually test it as you go. Write all of the methods in order as they appear in the code. DO NOT move on to another method until the previous method is fully tested. 1. The CandyBar class defines an object of type CandyBar. This object has three...
What quality costs will Mars incur from its recall of Snickers candy bars? The US chocolate maker Mars, one of the world’s largest privately-held companies, issued a voluntary recall in 55 countries for Snickers bars, Milky Way minis, and some other candy bar varieties that were manufactured in a Dutch factory between December 2015 and January 2016. A red piece of plastic was found in one Snickers bar by a customer in Germany; that piece of plastic was traced back...
5. (3 points) You have 16 pieces of candy to distribute to 7 people (all persons are distinguishable from one another). How many ways are there to distribute the candy if -each piece of candy is different? -each piece of candy is identical? -each piece of candy is identical and four people get at least one piece of candy each, while the three remaining people get none
5. (3 points) You have 16 pieces of candy to distribute to 7...
1.Suppose we have two bowls full of candies. Each bowl contains four different flavours of candy – grape (which are purple), lemon (which are yellow), cherry (which are red) and raspberry (which are also red). (a) [1 Mark] We will randomly select one candy from each bowl. The outcome of interest is the flavour of each of the two candies. Write out the complete sample space of outcomes. (b) [1 Mark] Suppose instead that we randomly select one candy from...
Chocolate bars are sold for $1 each. For every three chocolate wrappers you turn in, you receive $1 back. Implement a function iteratively which determines how many chocolate bars you can buy with x dollars. Expected results from function call: num_chocolatebars(0); //prints 0 num_chocolatebars(2); //prints 2 num_chocolatebars(3); //prints 4 (you spend 3 dollars on chocolate bars, you get three wrappers, then you receive one dollar back which you spend on another chocolate bar) num_chocolatebars(5); //prints 5 + (5/3) (integer division)...
PART 2: Which test-statistic, z, t, or neither? A candy factory that produces chocolate bars claims each bar weighs 50 grams, at least that is what is printed on the label. Of course, there is bound to be a little variation. An inspector randomly chooses 9 bars from one day's output of 4000 bars. The average weight of the 9 bars is only 47 grams with an SD of 3 grams. The inspector wishes to test the null hypothesis that...
You have 7 identical Probability books, 5 identical chocolate bars, and 2 identical Minivans to distribute to your friends Eric, Anna, and Katie. In how many ways can you distribute the gifts among your friends?
Set 5 a. A staircase has 10 steps. You walk up taking one or two at a time. How many ways can you go up? We have n dollars to spend. Every day we either buy a candy for 1 dollar, or an ice cream for 2 dollars. In how many ways can we spend the money? Explain for n-5, and then conjecture for n dollars. Prove your conjecture. Define Fibonacci numbers completely. Why do you need two initial values?...
Suppose you have decided to start a small business selling snacks from vending machines. You have secured a location for one candy vending machine in a local bookstore. Rental for the space will cost $200 per month. Vending machines can be purchased at wholesale clubs such as Sam’s Club and Costco. You can also purchase the snacks to stock the machines in bulk there. 1. Either visit a local warehouse club or review its website to determine the initial cost...