Skip to content

Handy Dandy Quick Reference Guide to Conditionals

sleepinghungry edited this page Feb 28, 2017 · 4 revisions

Conditionals

If you want check if something is greater than something else:

    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:`

BWX Game Engine pages

Python Pages

Step By Step Guides

Building Conditionals

Lectures

Explaining Conditionals

Assignments

I Am Thinking of a Number...

Clone this wiki locally