SPSS Tutorials

BASICS REGRESSION T-TEST CHI-SQUARE TEST ANOVA

Indentation (General Concept)

Definition

Indentation is the offset of some lines of code, usually by spaces or tabs.

Explanation

Python Example 1: correct indentation

begin program.
for number in [1,2,3,4,5,6]:
    if number %2 == 0:
        print number
        print "is an even number.\n"
end program.

Python Example 2: incorrect indentation

begin program.
for number in [1,2,3,4,5,6]:
    if number%2 == 0:
        print number
    print "is an even number.\n"
end program.

Python Example 3: incorrect indentation

begin program.
for number in [1,2,3,4,5,6]:
    if number%2==0:
        print number
print "is an even number.\n"
end program.

Previous tutorial: Escape Sequence (General Concept)

Next tutorial: Measurement Levels – What and Why?

Let me know what you think!

*Required field. Your comment will show up after approval from a moderator.