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 | |
|---|---|---|
| 1age = input("Age: ") | AShows the actual output, which the tester compares with the expected result written in the test plan. | |
| 2print("Total:", total) | Bnum = int(input("Number: ")) | |
| 3When testing, type the planned inputs in the order the program asks for them, and use the same inputs on every run. | CThe tester typed the inputs in a different order from the plan, so the values went into the wrong variables and the test is not repeatable. | |
| 4input() returns text, so a typed 7 arrives as the string "7" and must be converted before doing maths. | Dinput() returns text, so "3" + "4" joins the strings and prints 34, not 7. The actual output will not match the expected result. | |
| 5a = input("A: ") b = input("B: ") print(a + b) # Test: type 3 and 4, expect 7 | ETest 1: type 4, then 5, then check the output is 20 | |
| 6# Test plan: type 10, then 2 name = input("Name: ") age = input("Age: ") # Tester types 2, then 10 | FPauses the program so the tester can type a test value. Whatever is typed is stored in age as text. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
input() — Pauses a program so you can type a test value; it returns text. Test by typing each planned input in order, then compare the printed output with the expected result.age = input("Enter your age: ")
print(age)n = int(input("Number: "))
print(n * 2)a = input("First: ")
b = input("Second: ")
print(int(a) + int(b))x = input("Enter a number: ")
print(type(x))actual = "Hi " + input("Name: ")
print(actual == "Hi Sam")