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:

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