Boolean operators

This set of three operators (and, or, not) can be used to create multiple conditional expressions.

This example demonstrates all three operators being used.

score as integer = 50
lives as integer = 3

do if score = 50 and lives = 3 print ( "score is 50 and lives is 3" ) endif
if score = 50 and not lives = 3 print ( "score is 50 and lives is not 3" ) endif
if score = 25 or lives = 1 print ( "score is 25 or lives is 1" ) endif
sync ( ) loop

Try experimenting by setting score and lives to different values. How can the variables be set so that the second if statement becomes true? What needs to happen for the third if statement to become true?