Null
Null
Write a code that will ask the user to enter a cost of a dozen of eggs and the
number of dozens they want to buy. Calculate and display how much they will
make if they sell a certain number of eggs with a selling price that can be
obtained. Calculate and display the percentage of eggs that were sold and the
percentage of eggs left.
Considering the following piece of pseudocode:
Which statement will calculate the percentage of eggs left if the percentage sold
(rPercentSold) is known? Store your answer in rPercentLeft .
a) rPercentLeft=(iNumSold-iNumDozen)/rPercentSold
b) rPercentLeft=100.00+rPercentSold
c) rPercentLeft=100.00-rPercentSold
d) rPercentLeft=iNumSold-rPercentSold
3. Yohan is making a fruit punch for his party. The bowl for the fruit punch will hold a
certain number of litres. The local shop only sells fruit juice in containers of 150 ml.
BOTTLESIZE=150
If he buys 45 containers, and 70 litres is needed to fully fill the bowl; how many litres
will he still need to fill the bowl? You can store the answer in rRemLitres.
a) iNumRows= 20.8/(rChairCm/100+0.72)
b) iNumRows= (20.8*100 – 100)/(rChairCm+0.72*100)
c) iNumRows= 20.8/(rChairCm/100+0.72)*100
d) iNumRows= 20.8*100 - 100/(rChairCm+0.72)
5. Mrs Stone is tiling her new kitchen floor. The kitchen height, width and length are
all in meters and can be obtained . The size of the tiles (in squared cm) she has chosen
will also be provided. How many tiles will Mrs Stones need to buy to cover her kitchen
floor (only full tiles can be bought).
The following variables names are used:
6. Mrs Stone is tiling her new kitchen floor. The kitchen height, width and length are all in meters and can
be obtained . The size of the tiles (in squared cm) she has chosen will also be provided. How many tiles
will Mrs Stones need to buy to cover her kitchen floor (only full tiles can be bought).
The following variables names are used:
Considering the above problem statement, what is the data type of the output
a) integer
b) real
c) string
7. Luke was given a certain amount as a gift. He wants to buy as many CD's as he can. Each CD costs R9.
How many can he buy? ( for example, how many CD will a customer get if he has R100):
You can use the following variables
Amount given (rAmount)
Number of CD (iNumCD)
Considering the above problem, the following is true:
a) The output can be calculated and is rAmount=iNumCD*9
b) The amount given is the input and iNumCD=rAmount\9
c) iNumCD=rAmount/9 and 9 can be used as a constant
d) The input is 9 and iNumCD=rAmount/9
8. Using the following formula, you can calculate the temperature in Celsius after obtaining the
temperature in Fahrenheit:
9. You are asked to set out the school hall for an event. You are working out how many rows of seats you
can safely get in the 20.8 m from the back of the hall to the stage. Each chair takes up a certain number
of cm and you must leave another 0.72m for legroom. you must also leave a 1 metre gap at the back of
the hall. How many rows can you fit in?
Answer:
10. Write a code that will ask the user to enter a cost of a dozen of eggs and the number of dozens they
want to buy. Calculate and display how much they will make if they sell a certain number of eggs with a
selling price that can be obtained. Calculate and display the percentage of eggs that were sold and the
percentage of eggs left.
Answer:
11. Write a code that will ask the user to enter a cost of a dozen of eggs and the number of dozens they
want to buy. Calculate and display how much they will make if they sell a certain number of eggs with a
selling price that can be obtained. Calculate and display the percentage of eggs that were sold and the
percentage of eggs left.
Complete the following code that attempts to calculate the percentage of eggs sold.
rPercentSold=__________ /(iNumDozen*___)*100
Answer:
12. Considering the following pseudocode, select all the input variables
a) rKennel_Exercise
b) rCostFoodDay
c) rKennelFee
d) iNumdays
e) rTotalFood
13. Considering the following pseudocode, select all the output variables.
a) rKennel_Exercise
b) iNumdays
c) rCostFoodDay
d) rKennelFee
e) rTotalFood