Bird
0
0

What symbol is used to write a single-line comment in Python?

easy📝 Conceptual Q11 of 15
Python - Basics and Execution Environment
What symbol is used to write a single-line comment in Python?
A/* */
B//
C#
D<!-- -->
Step-by-Step Solution
Solution:
  1. Step 1: Identify the comment symbol in Python

    Python uses the # symbol to start a single-line comment.
  2. Step 2: Compare with other languages

    Other symbols like // or /* */ are used in languages like JavaScript or C, not Python.
  3. Final Answer:

    # -> Option C
  4. Quick Check:

    Single-line comment = # [OK]
Quick Trick: Single-line comments start with # in Python [OK]
Common Mistakes:
MISTAKES
  • Using // instead of #
  • Using /* */ for single-line comments
  • Confusing HTML comments with Python

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes