Question Detail

COS 102 lecture 4 Objective Question

Question

Is Python a case-sensitive language when it comes to identifiers?
Options
A No, Python ignores case for identifiers.
B Yes, Python is a case-sensitive language, meaning 'Labor' and 'labor' are distinct.
Correct Answer
C Only for keywords, not for custom identifiers.
D Only for class names, not for variables or functions.
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 18 explicitly states: 'Python is a case-sensitive language and this behavior extends to identifiers. Thus, Labor and labor are two distinct identifiers in Python.'

Hint

Look for the specific rule about case-sensitivity on page 18 under 'Naming Conventions'.

Question Info