0% found this document useful (0 votes)
20 views16 pages

Flowchart Questions

The document consists of various flowchart-related questions and tasks, including validation checks, algorithm descriptions, trace tables, and flowchart symbol representations. It covers algorithms for input validation, game scoring, temperature checks, and stock management, requiring the completion of trace tables and flowchart modifications. Additionally, it prompts the creation of flowcharts for specific algorithms and discusses potential improvements and extensions to existing algorithms.

Uploaded by

tomaf.gurl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views16 pages

Flowchart Questions

The document consists of various flowchart-related questions and tasks, including validation checks, algorithm descriptions, trace tables, and flowchart symbol representations. It covers algorithms for input validation, game scoring, temperature checks, and stock management, requiring the completion of trace tables and flowchart modifications. Additionally, it prompts the creation of flowcharts for specific algorithms and discusses potential improvements and extensions to existing algorithms.

Uploaded by

tomaf.gurl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

FLOWCHART QUESTIONS

1. This section of program code may be used as a validation


check.
1 PRINT "Input a value between 0 and 100 inclusive"
2 INPUT Value
3 WHILE Value < 0 OR Value > 100
4 PRINT "Invalid value, try again"
5 INPUTValue
6 ENDWHILE
7 PRINT "Accepted: ", Value
d) Draw a flowchart to represent this section of program code.
[5](Q4d/21/M/J/19)

1|P ag e
2. The flowchart represents an algorithm.
The predefined function DIV gives the value of the result of
integer division, for example, y ← 9 DIV 4 gives y a value of 2
An input value of –1 ends the algorithm.

a) Complete the trace table for the input data: 50, 33, 18, 15, 30, –1, 45, 12, 90, 6 [4]

2|P ag e
b) Describe the purpose of this algorithm. [2] (Q5/21/M/J/20)
_____________________________________________________________________________________
_____________________________________________________________________________________

3. This flowchart inputs the points won and the points lost when playing a game. The difference
between the points won and lost is calculated and depending on the result the player can: move up to
the next level, stay at the same level, or move down to the previous level. The flowchart finishes when
the input for points won is –1.

a) Complete a trace table for this set of input data: 5000, 4474, 6055, 2000, 7900, 9800, 3000, 2150, –1,
6700, 7615 [3]

3|P ag e
b) The flowchart needs to be changed. When the difference is more than 5000 the output message is
‘Fantastic leap up two levels’. Describe the changes that will need to be made to the flowchart. [3]
(Q4/22/M/J/20)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

4. Draw a flowchart symbol to represent each of the following: [2] (Q6/22/O/N/20)

5. This flowchart represents an algorithm that allows the input of two numbers and performs a
calculation. The predefined function MOD finds the remainder from integer division for example X 8
MOD 5gives X a value of 3.

4|P ag e
a) Complete a trace table for this set of input data: 11, 4, 6, 2, 3, 9, 3, 2, 2, 6, 0, 0, 1, 1 [4]

b) Explain the purpose of this algorithm. [2] (Q4/23/O/N/20)


_____________________________________________________________________________________
_____________________________________________________________________________________

6. Draw the most appropriate flowchart symbol for each pseudocode statement. [3] (Q3a/22/M/J/21)

5|P ag e
7. The flowchart represents an algorithm. The algorithm will terminate if –1 is entered.

6|P ag e
a) Complete the trace table for the input data: 50, 75, 99, 28, 82, 150, –1, 672, 80 [4]

(b) Describe the purpose of the algorithm. [2] (Q5/21/M/J/21)


_____________________________________________________________________________________
_____________________________________________________________________________________

7|P ag e
8. The flowchart represents an algorithm.The algorithm will terminate if –1 is entered at the List input.

8|P ag e
Complete the trace table for the algorithm using this input data : 2, 77, 2, 16, 1, 35, 2, –7, 5, 18, 1, 11, 1,
12, 2, 20, –1, 18 [5] (Q5/22/O/N/21)

9|P ag e
9. The flowchart shows an algorithm that should allow 60 test results to be entered into the variable
Score. Each test result is checked to see if it is 50 or more. If it is, the test result is assigned to the Pass
array. Otherwise, it is assigned to the Fail array.
a) Complete this flowchart. [6] (Q4a/21/M/J/22)

10 | P a g e
10. This algorithm checks the temperature of hot food being served to customers.

11 | P a g e
a) Complete the trace table for the algorithm using this input data: 75, 78, 84, 87, 91, 80, 75, 70, 65, 62,
–1, 20 [7]

b) State how the final output from the algorithm could be improved. [1]
_____________________________________________________________________________________

c) Identify the process in the algorithm that is not required. [1]


_____________________________________________________________________________________
(Q5/22/M/J/22)

12 | P a g e
11. This flowchart represents an algorithm to divide three-digit numbers into hundreds, tens and units.
The pre-defined function DIV gives the value of the result of integer division, for example Y = 9 DIV 4
gives the value Y = 2 the pre-defined function MOD gives the value of the remainder of integer division,
for example R = 9 MOD 4 gives the value R = 1

13 | P a g e
Complete the trace table for the algorithm using this input data:97, 876, 4320, 606, 9875, 42, 124
[5] (Q6/22/O/N/22)

12. This algorithm makes sure that there are enough wheelbarrows in stock.

14 | P a g e
a) Complete the trace table for this algorithm using this input data: "Y”, “Y”, “Y”, “Y”, “Y”, “Y”, “N” [4]

b) Explain how you could extend the algorithm to allow for the sale of more than one wheelbarrow at a
time. [3] (Q4/23/O/N/22)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

15 | P a g e
13. a) Draw a flowchart for an algorithm to:
• allow numbers to be input
• ignore any numbers that are negative
• Count how many numbers are positive
• output the count of positive numbers when zero is input and end the algorithm. [6]

b) Explain the changes you will make to your algorithm to also count the negative numbers. [2]
(Q5/2210/02B/SP/23)
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

16 | P a g e

You might also like