Company packages and sells boxes with marbles

Assignment Help Business Management
Reference no: EM132156735

Define the function marbles(n) to solve the following problem:

A company packages and sells boxes with marbles. The boxes come in two sizes: huge and small. The "huge" box contains 48 marbles and the "small" box contains 8 marbles. The company makes the most gain by selling huge boxes: CDN$26 each. Small boxes produce less gain but still some: a small box provides the company CDN$4 gain. On the other hand, the company loses CDN$ 2 per marble not packaged. Thus, the company will attempt to package as many huge boxes as possible, and then as many small boxes as possible.

This function receives as input in the parameter variable a number of marbles available and it should return a string with the following information: first, the number of huge boxes to package, followed by two dots ("..") followed by the number of small boxes to package, followed again by two dots, followed by the number of unused marbles, followed by two dots and finally the money the company makes, considering the gains (because of the boxes packaged) minus the losses (because of the unused marbles).

For example, calling this function as marbles(503) should return '10..2..7..254 ', because with 503 marbles the company can package 10 huge boxes, 2 small boxes and there are 7 unused marbles. The company makes CDN$ 254, that is, CDN$26 * 10 = CDN$ 260 because of the 10 huge boxes plus CDN$ 4 *2= CDN$ 8 minus CDN$ 2 * 7 = CDN$6 (the seven unused marbles).

Notice that the company may have a net loss, when there are not enough cookies to create any package.

For example:

cookies(7) should return '0..0..7..-14'

As an example, the following code fragment:

print (marbles(503))

should produce the output:

10..2..7..254

Reference no: EM132156735

Questions Cloud

Inherently superior to public enterprise : Does Singapore’s developmental experience prove false the old dichotomy of the private sector being inherently superior to public enterprise?
Summarizes your recommendation for my fellow student : A classmate of mine is not sure whether to buy a PC or a tablet. He needs the device for schoolwork (mostly Microsoft Office)
Reflect on the gender inequality and discrimination : After reading Chapter 5, p. 129-163. reflect on the gender inequality and discrimination that was prevalent during this time period.
Explain the signs and symptoms of the genetic condition : Imagine you are a genetics counselor working with a couple who have recently welcomed a new baby into their lives.
Company packages and sells boxes with marbles : A company packages and sells boxes with marbles. The boxes come in two sizes: huge and small. The "huge" box contains 48 marbles and the "small" box contains 8
What other products are available in product product line : What other products are available in this product’s product line? (UBER)
Describe the male and female of the species : Identify an animal species that exhibits sexual dimorphism, classify the dimorphism (i.e. color, size, ornamentation), describe the male and female.
Write a brief email on the vacation policy changes to be : Your supervisor has asked you to write a brief email on the vacation policy changes to be distributed to staff.
Difficulties with meeting customer service standards : How might they assist colleagues in overcoming difficulties with meeting customer service standards?

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd