LinkedIn Python Skill Assessment Quiz Answers

According to the PEP 8 coding style guidelines, how should constant values be named in Python?

Latest Update on 25th January, 2022 by Certification Course Answers

According to the PEP 8 coding style guidelines, how should constant values be named in Python?

  1.  in camel case without using underscores to separate words — e.g. maxValue = 255
  2.  in lowercase with underscores to separate words — e.g. max_value = 255
  3.  in all caps with underscores separating words — e.g. MAX_VALUE = 255
  4.  in mixed case without using underscores to separate words — e.g. MaxValue = 255

Correct Answer:

  •  in all caps with underscores separating words — e.g. MAX_VALUE = 255

Latest Updates

No posts found in this category.