Skip to content

Latest commit

 

History

History
 
 

08 - Handling conditions

Handling conditions

Conditional execution can be completed using the if statement

if syntax

if expression:
    # code to execute
else:
    # code to execute

Comparison operators

  • < less than
  • < greater than
  • == is equal to
  • >= greater than or equal to
  • <= less than or equal to
  • != not equal to