Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added <> boolean operator fixed spacing #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/booleans
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down