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.
# print('Hi')?print('Hello') # greeting# do?# input() vs input()# 'Test'Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1print('Hi') greeting | AValid: Comment | |
| 2// This is a comment | BOk: End-of-line comment | |
| 3# This is a comment | COutput: World | |
| 4print('Hi') # greeting | DInvalid: Use # not // | |
| 5# print('Hi') | EError: Missing # | |
| 6print('World') # test | FOutput: (nothing) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
# This is a comment — # is used to explain code - Python ignores text after the ## This gets user's name
input('Name: ')print('Hello') # greeting message# Get student details
input('Age: ')# Start Program
print('Press Enter')# This is a comment
print('Test')