Working with Boolean logic

Computer programs are made up data structures which use conditions and decisions that bring the desired outputs. We will use Python notation here, as it is simple, and you may have seen it before. The basic data structures are:

  • Iterators such as while loops and for loops. An iterator loops as many times as it is told to, running other commands each time it goes around
  • Decision Points such as If structures and Case structures. The preceding image is a diagram of a set of nested If structures

    Boolean Operators

     

    Notation

    Description

    X == Y

    X is equivalent to Y. This is not always a numeric value set

    X != Y

    X is not equivalent to Y

    X <= Y

    X is smaller than OR equivalent of Y

    X >= Y

    X is greater than or equivalent ...

Get Kali Linux 2: Windows Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.