Bad comments

Report a typo

Below you can find three code snippets with different comments. Unfortunately, all of them are bad! Match each code label with the explanation.

Code snippet A:

month = 'June'  # this variable contains the month
print('I was born in', month)

Code snippet B:

p = 50  # the age of a person
print('His age is', p)

Code snippet C:

counter += 4 #inсrease the counter
Match the items from left and right columns
Code snippet A
Code snippet B
Code snippet C
The comment is fine but the name of the variable is not clear.
Syntax is not in accordance with PEP-8.
The variable is obvious, we don't need to comment it.
___

Create a free account to access the full topic