Top | 50 Python Control Flow & Conditional Logic quiz | Question 1

Last Updated :
Discuss
Comments

What is the purpose of the if statement in Python?

 To define a function

To declare a variable

To execute a block of code conditionally

 To create a loop

Share your thoughts in the comments