forked from gever/bwx-adventure
-
Notifications
You must be signed in to change notification settings - Fork 1
Handy Dandy Quick Reference Guide to Conditionals
sleepinghungry edited this page Feb 28, 2017
·
4 revisions
if something > something_else:
Example:
if price > 45000:
#### If you want to check if something is less than something else: `if something < something_else:` _Example:_ `if price < 45000:`
#### If you want to check if something is equal to something else: `if something == something_else:` _Example:_ `if price == 45000:`
#### If you want to check if something is between two numbers: `if first_number < something < second_number:` _Example:_ `if 0 > price > 45000:`
#### If you want to check if something if greater than or equal to something else: ` if something >= something_else:` _Example:_ `if price >= 45000:`
#### If you want to check if something is less than or equal to something else: ` if something <= something_else:` _Example:_ `if price <= 45000:`
#### If you want to check if something is true: ` if something == True:` _Example:_ `if answer == True:`
#### If you want to check if something is false: ` if something == False:` _Example:_ `if answer == False:`