Tuesday, May 29, 2012

Exemplar question Input Processing Output

EXEMPLAR QUESTION      Input, output and processing                                (25)


When you saw how the SPCA calculates the cost of dog food you realised that you can easily write a scratch program to do the calculations for them.  The SPCA only buys Emerald Gold Pet Nutrition in 20kg bags.

1.    Open the project named Q1.sb in Scratch. 
1.1.   When you click on the dog, thedog must start walking from left to right and left to right continuously, turning around when it touches the edges                               (5)
1.2.   When you click on the green flag the program must
1.2.1.      ask how many kg of dog food you need and store the input in a variable named “kg”. Save.                                                                             (2)
1.2.2.      the dog food only comes in 20kg bags.  Calculate how many bags you will need if you round the number of bags up and store the number in a variable named “bags” (e.g. if you need more than 5 bags you have to buy 6 bags even if you only need 5.01 bags.  On the other hand, if you need 20kg exactly you only have to buy one bag). Save.                    (7)
1.2.3.      The dog food costs R270 per bag and you have to add VAT of 14 % to the final amount.  Calculate the total cost and store the value in a variable called “cost”. Save.                                                                           (6)
1.2.4.      Let the sprite say this value in a user friendly message formatted as follows:
You need 10 bags of dog food and the total cost is R3078. Save.       (5)
1.2.5.      Add your name as author to this program.
1.2.6.      Save the project summary in the same folder as the Scratch program
1.2.7.      Open the project summary in WordPad and print
[25]




No comments:

Post a Comment