num1 = 12 # Replace the ? with the equality operator to check if num1 is greater than 15" greater_than_15 = num1 > 15 # Finish the code to check if num1 is less than or equal to 12 less_or_equal_to_12 = num1 <= 12
Greater or less than
Just like the equals/not equals operators, when comparing numbers you can check if they are greater or less than each other.
<, >, <=, >=
Note that the for
>= the equal sign comes AFTER the
>, kind of similar to the shorthand in the previous assignment.
Complete the code for some practice.