Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1if age >= 13: | AA diamond asking 'Is lives more than 0?' where an arrow loops back to it from the Yes path | |
| 2while lives > 0: | Bscore = score + 1 | |
| 3A parallelogram that says 'Input name' becomes an input() call | CA diamond asking a question like 'Is age 13 or more?' where the flow only goes forward | |
| 4A rectangle that says 'Add 1 to score' becomes a statement | Dname = input('Name? ') | |
| 5if count < 5: count = count + 1 (flowchart has a back arrow to the diamond) | EThe flowchart has an arrow looping back to the diamond, so it needs a while loop, not an if. An if only checks once. | |
| 6while x > 10: print('Big') (flowchart diamond has no back arrow) | FThe diamond has no arrow looping back, so it is a one-time decision. It should be an if, not a while. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
if / while — A flowchart diamond (a decision) becomes if, or while when an arrow loops back to it. Rectangles become statements and parallelograms become input() or print().if age >= 13:
print("Teen")while count < 5:
count = count + 1name = input("Name? ")
print(name)score = 10
print(score)while lives > 0:
print("Playing")
lives = lives - 1