lc-python-intro icon indicating copy to clipboard operation
lc-python-intro copied to clipboard

Contribution: Naming Conventions in Episode 02: Variables and Assignment

Open aMp-hes opened this issue 5 years ago • 0 comments

Hey,

I noticed that one crucial point is missing on the naming conventions of variables, it says: "Variable names:

  • cannot start with a digit
  • cannot contain spaces, quotation marks, or other punctuation
  • may contain an underscore (typically used to separate words in long variable names)"

You should add a fourth point:

  • are case-sensitive (so "first_name", "First_Name", "first_Name" are all different variables!)

Also I would reformulate the first point in what's allowed for variable names and not saying what's not allowed: You are saying they cannot start with a digit, but that implies they can start with anything else so also with special characters like "?age". It's better to say:

Variable names

  • must start with a capital or non-capital letter or an underscore, you cannot start a variable name with any other special character or a number.

Greetings, Andre

aMp-hes avatar Nov 25 '20 07:11 aMp-hes