Programming ConceptsLesson 20Free preview
Comments
This lesson is part of Intro to Programming · All levels
Summary
This lesson discusses comments, notes in code that humans read but are ignored by a compiler or interpreter. Commenting serves to explain the intent of the code, temporarily disables certain lines, and facilitates team collaboration. Comment markers differ between languages, for example // in many languages and # in Python.
Key points
- Comments are notes for humans that are ignored when code is executed.
- Various commentary marks: //, #, /* */, depending on the language
- Commentary explains the difficult logic and helps collaboration
- Comments are also useful in disabling code temporarily during debugging
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.