Question

In: Computer Science

You are an apple farmer who sell apples by the boxes. Each box contains 6 Apples....

You are an apple farmer who sell apples by the boxes. Each box contains 6 Apples. You have 30 boxes of apples. Price of each box is $20. Using cout object as studied in the class and by use of algorithm(s), display following in the format as written below:

1. Total number of apples in all boxes are ______________
2. Total apples will be sold for $_____________________

Upload your assignment here.

using python and no copy from other assingment and it has to be only pseduco

Solutions

Expert Solution

Answers are:

  1. 30*6=180
  2. 30*20=600

Pseudocode: in python

  1. print('Total number of apples in all boxes are', num_of_boxes * num_of_apples_in_each_box)
    
  2. print('Total apples will be sold for $', num_of_boxes * price_of_each_box)

========

CODE AND OUTPUT:

SOURCE CODE:

*Please follow the comments to better understand the code.

**Please look at the Screenshot below and use this code to copy-paste.

***The code in the below screenshot is neatly indented for better understanding.

# take tha variables to store the data
num_of_boxes = 30
num_of_apples_in_each_box = 6
price_of_each_box = 20

# Answer to your 1st question
print('Total number of apples in all boxes are', num_of_boxes * num_of_apples_in_each_box)

# Answer to your 2nd question
print('Total apples will be sold for $', num_of_boxes * price_of_each_box)

=====================


Related Solutions

A farmer has produced 1000 apples and wants to sell them. He can sell the apples...
A farmer has produced 1000 apples and wants to sell them. He can sell the apples at two different markets: - At market 1, if the farmer sells x apples, he can sell them for 2/square root of x dollars each - At market 2, if the farmer sells y apples, he can sell them for 4/square root of y dollars each. Find out how the farmer should split his 1000 apples between both markets in order to maximize profit....
There are 5 boxes. One box is empty; two boxes each contains one marble; and the...
There are 5 boxes. One box is empty; two boxes each contains one marble; and the remaining two boxes each contains two marbles. Suppose that the colors of the marbles are not known, but it is known that each marble can only be either red or green, with equal probability. Suppose that ONE box is randomly chosen from the 5 boxes, and let R denote the number of the red marble(s) the box has, and G be the number of...
6) There are 5 boxes. In each box there are 5 tickets labelled with the numbers...
6) There are 5 boxes. In each box there are 5 tickets labelled with the numbers 1,2,3,4,5. An experiment is to draw one number at random from each of the five boxes. Calculate the following probabilities using a calculator, but show some work. a) P(no two numbers alike). b) P(exactly two alike). (example 11234) c) P(exactly three alike). (example 11123) d) P(exactly four alike). (example 11112) e) P(two pair). (example 11223) f) P(the number 4 comes up at least once)
Suppose 2 boxes: - Box #1 contains: + 5 Black balls. + 6 White balls. -...
Suppose 2 boxes: - Box #1 contains: + 5 Black balls. + 6 White balls. - Box #2 contains: + 8 Black balls. + 4 White balls. - Two balls are drawn from Box #2 and placed into Box #1. - A ball is drawn from Box #1. 1- What is the probability that the ball drawn from Box #1 is White? 2- Suppose that the ball drawn from Box #1 is White, then what is the probability that at...
Suppose 2 boxes: - Box #1 contains: + 5 Black balls. + 6 White balls. -...
Suppose 2 boxes: - Box #1 contains: + 5 Black balls. + 6 White balls. - Box #2 contains: + 8 Black balls. + 4 White balls. - Two balls are drawn from Box #2 and placed into Box #1. - A ball is drawn from Box #1. 1- What is the probability that the ball drawn from Box #1 is White? 2- Suppose that the ball drawn from Box #1 is White, then what is the probability that at...
Company produces and sells 90,000 boxes of specialty foods each year. Each box contains the same...
Company produces and sells 90,000 boxes of specialty foods each year. Each box contains the same assortment of food. The company has computed the following annual costs: Cost Item Total Costs Variable production costs $630,000 Fixed production costs 470,000 Variable selling costs 180,000 Fixed selling and administrative costs 170,000 Total costs $1,450,000 Mendenhall normally charges $ 30 per box. A new distributor has offered to purchase 9,000 boxes at a special price of $ 27 per box. Mendenhall will incur...
An apple orchard farmer wants to know the true population proportion of all apples harvested at...
An apple orchard farmer wants to know the true population proportion of all apples harvested at their farm which have the less valuable condition of being blemished, or in other words, are cider apples. This true population proportion is a parameter value represented by the symbol p. As a population parameter, this value can never be known with certainty. It can however, be estimated with varying levels of confidence. To estimate this parameter p, the farmer draws a simple random...
Two boxes are labelled I and II. Box I contains 4 black balls and 6 white...
Two boxes are labelled I and II. Box I contains 4 black balls and 6 white balls. Box II contains 2 black balls and 8 white balls. A player randomly selects one box and then randomly draws 2 balls without replacement from the selected box. 1) What is the probability of obtaining 2 black balls? 2) Given that 2 black balls are obtained, what is the probability that Box I is selected? 3) Suppose that 20 players conduct the game...
Company produces and sells 55 comma 00055,000 boxes of specialty foods each year. Each box contains...
Company produces and sells 55 comma 00055,000 boxes of specialty foods each year. Each box contains the same assortment of food. The company has computed the following annual​ costs: Cost Item Total Costs Variable production costs $330,000 Fixed production costs 520,000 Variable selling costs 165,000 Fixed selling and administrative costs 160,000 Total costs $1,175,000 GarrardGarrard normally charges $ 21$21 per box. A new distributor has offered to purchase 5 comma 5005,500 boxes at a special price of $ 17$17 per...
Suppose 400 balls are distributed into 200 boxes in such a way that no box contains...
Suppose 400 balls are distributed into 200 boxes in such a way that no box contains more than 200 balls and each box has at least one ball. Then there are some boxes that together contain exactly 200 balls.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT