Comments, online

Six activities your students do on their own devices. See who's finished, and their scores.

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 #.

Discover other journeys with this module

What students will learn in this module

Every question in Module 3

Quick questions

  1. What happens to # print('Hi')?APrints HiBNothing (ignored)
  2. What displays? print('Hello') # greetingAHelloBgreeting
  3. What does # do?APrints # symbolBMakes text a comment
  4. Which line runs? # input() vs input()ASecond line onlyBBoth lines
  5. 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 does
print('Hi') # greetingMatch it to what it does
# print('Hi')Match it to what it does
print('World') # testMatch it to what it does

Fill in the blanks

  1. _ This gets user's name
    input('Name: ')
  2. print('Hello')  _ greeting message
  3. # Get student details
    i____('Age: ')
  4. _ Start Program
    p____('Press Enter')
  5. # 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')