Python Syntax Flashcards
As we learned in the previous page, Python syntax can be executed by writing directly in the Command Line:
Execute Python Syntax
Indentation refers to the spaces at the beginning of a code line.
Python Indentation
Python uses indentation to indicate a block of code.
Python Indentation
The number of spaces is up to you as a programmer, the most common use is four, but it has to be at least one.
Python Indentation
You have to use the same number of spaces in the same block of code, otherwise Python will give you an error:
Python Indentation
In Python, variables are created when you assign a value to it:
Python Variables
Python has no command for declaring a variable.
Python Variables
Python has commenting capability for the purpose of in-code documentation.
Comments