Introduction to Programming Using Python — Question 38

You develop a Python application for your company.
You want to add notes to your code so other team members will understand it.
What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because comments in Python are created using the # symbol, allowing for inline explanations on any line. Options B and C suggest placing comments in positions that do not adhere to Python's commenting conventions, which would not be effective for code clarity. Option D is incorrect as comments cannot be enclosed in parentheses in Python.