Which symbol begins a single-line comment in Python?
Suggested Answer: B
Get Premium Foundations of Programming (Python) (E010) Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
In Python, a single-line comment begins with the # symbol.
Example:
# This is a comment
print('Hello')
Python ignores the comment when the program runs. The Python documentation identifies # as the symbol used for comments.
Therefore, the correct answer isB. # pound symbol.
24 comments · newest first
CA
Carmela
2 days ago
Same here! The other options don't make sense for comments.
TH
Theodora
7 days ago
I was unsure at first, but I remember using # in my code.
OZ
Ozell
12 days ago
Agreed! The # symbol is definitely used for comments.
KI
Kimberlie
17 days ago
I think it's B) # pound symbol. That's the right one.
LA
Lashaun
23 days ago
B) # is the only one that fits.
DE
Denae
28 days ago
Asterisk and percent don't make sense for comments.
TH
Thersa
1 month ago
I remember learning that in my first Python class.
MA
Malcolm
1 month ago
Definitely B) #, it's the standard for comments.
FR
France
1 month ago
A) // double forward slash seems wrong for Python.
HE
Helga
2 months ago
Yeah, I feel confident about that too!
CO
Corinne
2 months ago
I think it's B) # pound symbol.
SH
Shonda
2 months ago
I thought it was A) // at first, but I guess not!
LU
Lura
2 months ago
Yeah, I remember learning that too.
BA
Barb
2 months ago
Wait, are you sure? I thought it was something else.
TH
Thaddeus
2 months ago
Agreed, # is the right one!
AM
Amalia
3 months ago
It's definitely B) # pound symbol.
MA
Mari
3 months ago
I’m pretty sure it’s the pound symbol too, but I might be mixing it up with another language.
ID
Idella
3 months ago
I definitely remember that comments start with a symbol, but I can't recall if it's the asterisk or the pound symbol.
AU
Audry
3 months ago
I'm not entirely sure, but I feel like it could be the double forward slash. That was in a similar question we did.
GL
Glenna
3 months ago
I think it's the pound symbol, so that would be B. I remember it from the practice questions.
CA
Carlton
4 months ago
I’m pretty confident it’s the # symbol, but I guess I should double-check my notes.
JE
Jean
5 months ago
I’m a bit confused; could it be the // double forward slash? That seems familiar.
ME
Mel
5 months ago
I remember practicing a question like this, and I think the answer is B.
LE
Lelia
5 months ago
I think it's the # pound symbol, but I’m not completely sure.