Conditional statements Conditional statements allow you to execute a block of code only if a specific condition is true. Syntax if condition: # code to execute if condition is true elif another_condition: # code to execute if another_condition is true else : # code to execute if all conditions are false Examples Simple if statement age = 18 if age >= 18 : print ( "You are eligible to vote." ) # Output: You are eligible to vote. if-else statement num = 10 if num % 2 == 0 : print ( "Even number" ) else : print ( "Odd number" ) # Output: Even number if-elif-else ladder marks = 85 if marks >= 90 : print ( "Grade: A" ) elif marks >= 75 : print ( "Grade: B" ) else : print ( "Grade: C" ) # Output: Grade: B Nested if statements num = 10 if num > 0 : if num % 2 == 0 : print ( "Positive even number" ) else : print ( "Positive o...