Question: What is the purpose of an if/else statement?

  1. It tells the computer which chunk of code to run if the instructions you coded are incorrect.
  2. It runs one chunk of code if all the imports were successful, and another chunk of code if the imports were not successful.
  3. It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.
  4. It tells the computer which chunk of code to run if the is enough memory to handle it, and which chunk of code to run if there is not enough memory to handle it.

Answer: The correct answer of the above question is Option C:It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.