Question: What is the purpose of an if/else statement?
- It tells the computer which chunk of code to run if the instructions you coded are incorrect.
- It runs one chunk of code if all the imports were successful, and another chunk of code if the imports were not successful.
- It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.
- 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.