Single Choice Not Set

QComments in Python begin with ...?

ID: #3393 Python Basic MCQ 431 views
Question Info
#3393Q ID
Not SetDifficulty
Python Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A { ✔ ✖
  • B % ✔ ✖
  • C * ✔ ✖
  • D # ✔ ✖
Correct Answer

Explanation

In Python, a single-line comment begins with the # (hash) symbol. Comments are used to explain code, improve readability, or temporarily disable statements. The Python interpreter ignores everything after # on that line.

Example:

# This is a comment
print("Hello, World!")  # Display a message

Output:

Hello, World!

The other options are incorrect because {, %, and * are not used to begin comments in Python.

Therefore, the correct answer is Option D) #.

Share This Question

Challenge a friend or share with your study group.