Comments, online
Six activities your students do on their own devices. See who's finished, and their scores.
Learning
Understanding
Testing
Comments in one minute
What students need to know
# This is a comment is valid Python comment syntax. Comments can go after code on the same line with proper spacing.
The # makes the whole line a comment — Python skips it entirely. Everything after # is a comment — only the code before it runs.
Mistakes students make
- Wrong comment symbol: // should be #.
- Missing closing quote.
- Missing parentheses on print.
- Wrong comment symbol: -- should be #.
What students will learn in this module
Every question in Module 3
Quick questions
- What happens to
# print('Hi')?APrints HiBNothing (ignored) - What displays?
print('Hello') # greetingAHelloBgreeting - What does
#do?APrints # symbolBMakes text a comment - Which line runs?
# input()vsinput()ASecond line onlyBBoth lines - What displays?
# 'Test'ANothingBTest
Key terms
Students type the meaning of:
# This is a comment
Match the pairs
print('Hi') greetingMatch it to what it does// This is a commentMatch it to what it does# This is a commentMatch it to what it doesprint('Hi') # greetingMatch it to what it does# print('Hi')Match it to what it doesprint('World') # testMatch it to what it doesFill in the blanks
_ This gets user's name input('Name: ')print('Hello') _ greeting message# Get student details i____('Age: ')_ Start Program p____('Press Enter')# This is a c______ print('Test')
Spot the error
Question 1
Aprint('Hello')B// This is a commentCinput()
Question 2
A# Get user nameBinput('Name: ')Cprint('Age: )
Question 3
Aprint('Hi')B# input('Name: ')Cprint 'Done'
Question 4
A# Student formBprint('Name: ')C-- This is commentedDinput()
Question 5
Aprint('Start')Binput('Data: ') // end-of-lineCprint('End')
