course content

Course Content

Introduction to Python | Mobile-Friendly

Naming ConventionsNaming Conventions

We considered the 'technical' side of naming variables in the previous chapter. At the same time, there are several conventions among programmers in regard to naming. These are:

  • Variables’ names should be lowercase.
  • For variables’ names that contain several words, we should separate these words with the underscore characters (_).

These rules are not compulsory, but they are recommended. For example, if you need to store the number of a user's points, it will be much better to use points, num_of_points, or n_points instead of n, p, or something like that.

question-icon

Choose the most appropriate choices for meaningful variable names that satisfy the abovementioned conventions.

Select a few correct answers

Everything was clear?

Section 2. Chapter 3