EDPT Flowchart Interpretation 5 — Questions and Answers
Question 1: A flowchart reads a sequence of numbers until a sentinel value of -1 is entered. The loop condition is 'Number ≠ -1'. Where is the sentinel check placed in a While-type loop?
- After the process block
- Before the process block (Correct answer)
- At the start and end
- Only at the end
Correct answer: Before the process block
In a While loop, the condition is checked before the process block so the body never executes if the first input is the sentinel.
Question 2: A flowchart uses a cylinder symbol. What does this represent?
- A manual operation
- A stored data file or database (Correct answer)
- A display output
- A network connection
Correct answer: A stored data file or database
A cylinder (drum) shape represents stored data, typically a database or disk storage.
Question 3: Trace this logic: X=10, Y=3. Step 1: R = X mod Y. Step 2: X = Y. Step 3: Y = R. Step 4: If Y ≠ 0 go to Step 1. What is X when the loop ends?
- 1 (Correct answer)
- 2
- 3
- 10
Correct answer: 1
This is the Euclidean algorithm: 10 mod 3=1, then 3 mod 1=0, loop ends with X=1, which is the GCD.
Question 4: A flowchart has a decision: 'Is List Empty?' with Yes going to End and No going to process the next item. What problem does this guard prevent?
- Infinite output
- Processing an empty list causing errors (Correct answer)
- Duplicate entries
- Incorrect sorting
Correct answer: Processing an empty list causing errors
Checking if the list is empty before processing prevents errors that would occur when trying to read from an empty data structure.
Question 5: A flowchart assigns grades: if score ≥ 60 output 'Pass', else output 'Fail', then always output 'Done'. For a score of 45, what is the complete output?
- Pass, Done
- Fail, Done (Correct answer)
- Fail only
- Done only
Correct answer: Fail, Done
A score of 45 is below 60, so 'Fail' is output, then the unconditional 'Done' step always executes after the decision.
Question 6: In a flowchart, when a connector circle contains a letter (e.g., 'A'), it means:
- The process is named 'A'
- Flow continues from or to another matching 'A' connector (Correct answer)
- Step A is skipped
- A subroutine named A is called
Correct answer: Flow continues from or to another matching 'A' connector
Labeled connectors are paired—flow leaving one 'A' connector continues at the matching incoming 'A' connector, even across pages.
Question 7: A flowchart counts how many numbers in a list are greater than 100. After the loop, it outputs the count. If the list is [50, 150, 200, 75, 125], what is the output?
- 2
- 3 (Correct answer)
- 4
- 5
Correct answer: 3
The values 150, 200, and 125 are greater than 100, so the counter reaches 3.
A flowchart reads a sequence of numbers until a sentinel value of -1 is entered.
The loop condition is 'Number ≠ -1'.
Where is the sentinel check placed in a While-type loop?