Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

Exam PCPP-32-101 topic 1 question 20 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 20
Topic #: 1
[All PCPP-32-101 Questions]

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

  • A. Function and variable names should be lower-case with words separated by underscores.
  • B. You should always use self as the first argument to instance methods, and cls as the first argument to class methods.
  • C. Modules should have short names written in CamelCase.
  • D. Constants should be written in all lower-case letters with words separated by underscores.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
w_w_w_w_w_w
1 year, 4 months ago
Selected Answer: AB
It's A en B. Lookup the documentation. Not D: Constants are usually defined on a module level and written in all capital letters with underscores separating words. Examples include MAX_OVERFLOW and TOTAL
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...