Completing a flowchart prediction table

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Completing a flowchart prediction table

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which column layout is best for a flowchart prediction table?
A Only the final answer at the end
B Shape or step, Yes/No answer, variable values, output
2. A flowchart diamond asks: Is score > 50? and score is 60. What do you write in the Yes/No column?
A Yes
B No
3. Which shape gets a Yes or No entry in the prediction table?
A A decision diamond
B A process rectangle
4. In what order do you fill in the rows of a prediction table?
A In the order you visit the shapes, following the arrows
B In the order the shapes are drawn on the page, top to bottom
5. A flowchart goes through a loop 3 times. How many rows does the loop's decision diamond get?
A Only one row in total
B One row for every visit to the diamond

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1score > 50? | Yes Acount > 3? | Yes | count = 5
2OUTPUT total | 12 in Output column BStart | total <- 0 | count > 3? | OUTPUT total
3Each shape you visit gets its own row, in the order you visit it CAn output shape row: write the value that is displayed in the output column
4A decision row records Yes or No, and the variable values stay the same DThe answer to a diamond must be Yes or No. The student wrote the value of count instead.
5count > 3? | 5 EA diamond row: write the Yes or No answer to the decision in the answer column
6total <- 0 | OUTPUT total (no diamond row) FThe decision shape was skipped, so its row and Yes or No answer are missing from the table.

Definitions

prediction table

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Shape | Yes or No | x | ______
2.
x ← 3 Is x > 5? Answer: __
3.
x ← 4 Process: x ← x + 2 Value of x after step: _
4.
count ← 3 Is count <= 3? Answer: ___
5.
total ← 2 + 3 Output total Output column shows: _

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Start | x not set yet
B Process x<-5 | x=5
C Decision x>3? | No
D Output x | 5
Question 2
A Process n<-0 | n=0
B Process n<-n+1 | n=1
C Process n<-n+1 | n=3
D Output n | 2
Question 3
A Process total<-10 | total=10
B Process total<-total+5 | 15
C Process total<-total*2 | 25
D Output total | 30
Question 4
A Process x<-8 | x=8
B Decision x<5? | Yes
C Output x | 8
Question 5
A Process i<-1 | i=1
B Decision i<=3? | No
C Output i | 1
D Process i<-i+1 | i=2

Answer Key

Completing a flowchart prediction table
Section A: Quick Questions
Q1
B — Shape or step, Yes/No answer, variable values, output
Q2
A — Yes
Q3
A — A decision diamond
Q4
A — In the order you visit the shapes, following the arrows
Q5
B — One row for every visit to the diamond
Section B: Match the Pairs
Q1
score > 50? | Yes → A diamond row: write the Yes or No answer to the decision in the answer column
Q2
OUTPUT total | 12 in Output column → An output shape row: write the value that is displayed in the output column
Q3
Each shape you visit gets its own row, in the order you visit it → Start | total <- 0 | count > 3? | OUTPUT total
Q4
A decision row records Yes or No, and the variable values stay the same → count > 3? | Yes | count = 5
Q5
count > 3? | 5 → The answer to a diamond must be Yes or No. The student wrote the value of count instead.
Q6
total <- 0 | OUTPUT total (no diamond row) → The decision shape was skipped, so its row and Yes or No answer are missing from the table.
Section C: Definitions
Q1
prediction table — A table listing each flowchart shape you visit in order, the Yes or No answer at each diamond, the variable values after each step, and any output.
Section D: Fill in the Blanks
Q1
Shape | Yes or No | x | Output
Q2
x ← 3 Is x > 5? Answer: No
Q3
x ← 4 Process: x ← x + 2 Value of x after step: 6
Q4
count ← 3 Is count <= 3? Answer: Yes
Q5
total ← 2 + 3 Output total Output column shows: 5
Section E: Spot the Error
Q1
C — x is 5 and 5 is greater than 3, so the answer at the diamond is Yes, not No. The row should read: Decision x>3? | Yes.
Q2
C — n was 1 before this step, so adding 1 makes it 2, not 3. The row should read: Process n<-n+1 | n=2.
Q3
C — total was 15 and doubling it gives 30, not 25. The row should read: Process total<-total*2 | 30.
Q4
B — x is 8 and 8 is not less than 5, so the answer at the diamond is No. The row should read: Decision x<5? | No.
Q5
B — i is 1 and 1 is less than or equal to 3, so the answer is Yes. The later rows only make sense if the decision was Yes.