From 1bc0ca541e0cc43c7e3daae82b6ca9feec642c77 Mon Sep 17 00:00:00 2001 From: Dor-Ron Date: Sun, 12 Jul 2015 11:41:29 -0400 Subject: [PATCH] Added <> boolean operator fixed spacing Pretty much what is says in the title. --- python/booleans | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/booleans b/python/booleans index 19b9422..4ebe5aa 100644 --- a/python/booleans +++ b/python/booleans @@ -5,14 +5,15 @@ fake = False #Boolean operators are as follows 7 == 7 #This is True because 7 equals itself 2 != 2 #This is False because 2 does equal itself +2 <> 4 #This is True because 2 does not equal itself. NOTE: no longer supported in Python 3.x 3 > 1 #True because 3 is greater than 1 6 < 1 #False because 6 isn't less than 1 2 >= 2 #True because 2 is greater than or EQUAL to itself 2 <= 2 #True becuase 2 is less than or EQUAL to itself #Also if you add the word 'not' infront of a statement it negates it so -not (2 == 2) #False because 2 equals 2 is true and negate that making false -not (2 > 3) #True because 2 is greater than 3 is false and negate that making it true +not (2 == 2) #False because 2 equals 2 is true and negate that making false +not (2 > 3) #True because 2 is greater than 3 is false and negate that making it true #There are also AND and OR conditons. (2 == 2 and 2 < 4) #2 True statements evaluate to True