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 | |
|---|---|---|
| 1name <- input("Enter name: ") | AAsking for a value is an input, not an output. It should be in the Input column, and Output should only list results or messages displayed. | |
| 2print("Total: ", total) | BA calculation has been placed in the Input column. It should be in the Process column, because Input only lists values the user enters. | |
| 3A Process row lists a calculation the program makes with the inputs | Ctotal <- price * quantity | |
| 4A Process row can also record a decision the program makes | DAn Output row in an IPO chart: the program displays a message and the result to the user | |
| 5Input column: total <- price * quantity | Eif mark >= 50 then result <- "Pass" | |
| 6Output column: ask the user for their age | FAn Input row in an IPO chart: the program asks the user to enter a name and stores it in a variable |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IPO chart — A table with Input, Process and Output columns that lists what the user enters, the calculations and decisions the code makes, and the results or messages it displays.age = input("Enter your age: ")price = float(input("Price: "))
qty = int(input("Qty: "))
total = price * qtytotal = price * qty
print("Total cost: ", total)mark = int(input("Mark: "))
if mark >= 50:
print("Pass")name = input("Name: ")
print("Hello, " + name)