Drop links or images here to add them to the editor.

In Python is correct inspringen cruciaal. Door in te springen geef je aan welke code bij een if-gedeelte hoort:

x = 11
if x < 10:
    print("Alleen als x < 10")    # ingesprongen → hoort bij if
    print("Dit ook")              # ingesprongen → hoort bij if
print("Altijd uitgevoerd")        # niet ingesprongen → altijd

Met x = 11 wordt alleen de laatste regel geprint. Met x = 7 worden alle drie de regels geprint.

Tips: