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.
"*" * 5?"-" * 3?"Ha" * 3?"=" * 10?"*" * 5 add spaces?Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1'Ha' * 2.5 | AOutput: ***** | |
| 2'abc' * 'abc' | BOutput: HaHaHa | |
| 3line = '-' * 20 | CValid: Repeats - 20 times | |
| 4'Ha' * 0 | DError: Can't multiply str by str | |
| 5print('Ha' * 3) | EOk: Returns empty string | |
| 6print('*' * 5) | FError: Multiplier must be int |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
"*" * 10 — * repeats the string - "*" * 10 gives **********.~~"-" * 5line = "-" * 20
# Output: --------------------stars = "*" * 10
# Output: **********border = "=" * 15
# Output: ===============laugh = "Ha" * 3
# Output: HaHaHaseparator = 20 * "-"
# Output: --------------------