Ahh, I see. Well, if you have any questions regarding things like that, feel free to ask. Regarding indentation, its one of the particular quirks of the Python syntax, its a way of encapsulating blocks of code to determine what to run and where. To be clear, all languages are like this, but have slightly different ways of going about it. In the C language you would use squiggly brackets instead, so for example:
if (button == 1)
{
printf("button pressed");
}
The brackets tells the computer that when the above If statement is true, it should run the code thats beneath it in between the squiggly brackets. The computer doesn't care what indentation you use, just so long as the code you want to run when the if statement is triggered is between those two squiggly brackets. For some people though this way of writing it can get pretty messy and hard to visually understand, especially if people start writing particularly messy code. Python however uses indentation instead of squiggly brackets to determine what code belongs where and what code to execute when triggered, which is visually cleaner and easier to read. Using the same example above in Python:
if button == 1:
print "this code is under this if statement, and will only run when the if statement is true"
print "this code is not! under the if statement, and will run whether its true or not"
When the if statement is triggered the computer will run any code thats indented underneath it, and if theres code thats unevenly indented it will throw an indentation error. This can make it easier to keep track of what code is appart of what and helps make it easier to manage.
-
BrushTone v1.3.3: Accessible Paint Tool
-
AudiMesh3D v1.0.0: Accessible 3D Model Viewer