+ 1
What Is The Difference?
Whenever I Declare Variable (in Python and c# Cause I Only understand those ones),If I Start With Upper Class letter ,it Suddenly Change into blue .But That Doesn't Happen if I Start With Lower Class letter. And I can Use Them Normal Variable .For Instance,I Can Sum Up With different color Variable and Have No Error.So...What Is The Deal?
2 Respostas
+ 6
In Sololearn, variable names starting with an uppercase letter may change color to blue to indicate that they are recognized as class names.
However, you can still use them as regular variables with no issues in your code sometime. The color change is just a visual aid and does not affect how the variables behave in your code.
+ 5
The change of colour you noticed is part of a feature commonly known as syntax highlighting. It is a common feature for code editors and IDEs.
https://en.m.wikipedia.org/wiki/Syntax_highlighting
Some code editors and IDEs allow customisation of colour. The code editor/IDE user can then setup how comments, reserved words, constants, variables etc. look to fit their preferences. There is presumably no specific rules on syntax highlighting colour choice, considering that is a customisable feature.