Until now, your code has been like a straight road—it runs from the top to the bottom without ever changing direction. But what if your program could think? In Level 6, we introduce Conditional Logic.
The syntax for an if statement is very specific in Python. We use comparison operators like == (equal to), > (greater than), or < (less than). A critical rule at FLORA WORLD CODING: always remember the colon (:) at the end of your condition and the indentation (the space) on the next line.
AGE. WRITE AN IF STATEMENT THAT CHECKS IF THE AGE IS GREATER THAN 18. IF IT IS, PRINT "YOU ARE AN ADULT!" CHANGE THE VALUE TO SEE IF THE MESSAGE DISAPPEARS!