nerdexam
Python_Institute

PCPP-32-101 · Question #74

Select the true statements related to PEP 8 naming conventions. (Choose two.)

The correct answer is C. Modules should have short names entirely in lower-case. D. You should never use the characters "I" (lower-case letter "el") and "O" (upper-case letter "oh") as. PEP 8 recommends that module names be short and all lowercase. To avoid confusion with similar-looking characters (like the digit 1 and zero), PEP 8 advises against using "I" and "O" as single-character variable names.

PEP and Best Practices

Question

Select the true statements related to PEP 8 naming conventions. (Choose two.)

Options

  • AClass names should use the mixedCase naming style.
  • BException names should follow the function naming conventions.
  • CModules should have short names entirely in lower-case.
  • DYou should never use the characters "I" (lower-case letter "el") and "O" (upper-case letter "oh") as

How the community answered

(43 responses)
  • A
    2% (1)
  • B
    5% (2)
  • C
    93% (40)

Explanation

PEP 8 recommends that module names be short and all lowercase. To avoid confusion with similar-looking characters (like the digit 1 and zero), PEP 8 advises against using "I" and "O" as single-character variable names.

Topics

#PEP 8#naming conventions#modules#exceptions

Community Discussion

No community discussion yet for this question.

Full PCPP-32-101 Practice