Question 1 out of 5

    What is the purpose of the Python 'if' statement?

    To execute a block of code based on a condition

    The 'if' statement in Python is used to execute a block of code based on a condition. It allows conditional execution of code based on the evaluation of an expression.