Professional Documents
Culture Documents
Sample Past Paper Questions - Revision
Sample Past Paper Questions - Revision
b) What are the 2 methods which we can use to represent an algorithm? [2 Marks]
(i) Which of the following is correct regarding the above flowchart? [1 Marks]
a) It repeats more than three times.
b) It stops when 3 is entered for num.
c) It displays the total when the count is 3.
d) It gets 4 numbers from a user.
(ii) Write a suitable formula, which can be used to replace “Add num to total” in the
flowchart? [1 Marks]
(iii) Mention the suitable operator type and the name of the operator we can use for the
condition in the above flow chart. [2 Marks]
(iv) Write 2 advantages of using flowcharts. [2 Marks]
Question 2 [20 Marks]
You are asked to write a python program to calculate the payment due for a food tray. For this purpose,
each food type is given a unique integer from 0 to 9.
The integer value assigned to each food type and its unit price is shown in the following table.
Food Type 0 1 2 3 4 5 6 7 8 9
Unit Price Rs. 10.00 12.00 15.00 10.00 25.00 45.00 50.00 25.00 10.00 12.00
i) State all the inputs required for the computer program and its expected output. [3 Marks]
ii) write a python program to calculate the payment due for a food tray [7 Marks]
Question 3 [10 Marks]
The following algorithm is to find the sum and average of given series of numbers.
Complete the algorithm by dragging and dropping the labels to relevant blank labels from the list
given below.
Step-1 Start
Step-2 ___________________
Step-3 SUM=0
Step-4 ___________________
Step-5 ___________________
Step-6 COUNT=COUNT+1
Step-7 IF More Numbers in the Series, then
Step-8 ___________________
Step-9 ELSE
Step-10 ___________________
Step-11 DISPLAY SUM, AVERAGE
Step-12 Stop
AVERGAE= COUNT / SUM COUNT = 2 GOTO Step - 4 COUNT = 0 SUM = SUM + NUM
GOTO Step -12 INPUT NUM = SUM + SUM AVERGAE=SUM / COUNT INPUT NUM
COUNT
Question 4 [10 Marks]
Select the correct answer and drag and drop to the correct space.
Hint – Look at the star pattern, it only displays stars for odd number patterns!
1. count=10
2. _________
3. for i in range (count):
4. if (_________):
5. _________
6. else:
7. for x in range (i):
8. _______________
9. _______