Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Comments

Comments are lines of code that are ignored completely by the computer.

What are comments?

What are comments?

  • A comment is a line of code that is completely ignored by the computer.
  • Comments can be used to add description to your code to make it easier for other people to understand.
  • They can also be used to leave notes and reminders to yourself as you work on a complex program.
How to comment

How to comment

  • To write a comment in most languages, you must use a special character which tells the computer to ignore the rest of the line:
    • In Python, that character is a #.
Interfaces

Interfaces

  • An interface is a collection of comments which describe a subroutine.
  • An interface includes:
    • List of parameters and their types.
    • Return value and its type.
    • What the subroutine does.
Jump to other topics
1

Computational Thinking & Algorithms

2

Programming

3

Hardware & Software

4

Data

5

The Internet

6

Online Safety & Security

Practice questions on Comments

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
Answer all questions on Comments

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium