Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Naming Conventions | Variables
Introduction to Python | Mobile-Friendly
course content

Conteúdo do Curso

Introduction to Python | Mobile-Friendly

Introduction to Python | Mobile-Friendly

1. Python Basics
2. Variables
3. Strings

book
Naming 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 mark

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

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 3
Sentimos muito que algo saiu errado. O que aconteceu?
some-alt