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 = int(input()) | APrice = float(input()) | |
| 2print(Name, Score) | BPython for INPUT Age: reads what the user types and turns the text into a whole number | |
| 3Python has no ← arrow, so the pseudocode Total ← 0 is written with a plain = sign | CAge is still text because int() was not used, so adding 1 to it causes an error. It should be Age = int(input()). | |
| 4To read a decimal number such as a price, wrap input() in float() so the text becomes a real number | DPython for OUTPUT Name, Score: shows both values on one line | |
| 5Age = input() Next = Age + 1 | EPseudocode was left unchanged: Python needs Total = 5 and print(Total) instead of the arrow and OUTPUT. | |
| 6Total ← 5 OUTPUT Total | FTotal = 0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Age = int(input()) — Python for INPUT Age: = replaces the arrow, input() reads text, and int() turns that text into a whole number. OUTPUT Age becomes print(Age); use float() for decimals.Name = input()Age = int(input())Price = float(input())Total = 7 + 3
print("Total:", Total)Score = int(input())