LinkedIn Python Skill Assessment Quiz Answers

What is the purpose of an if/else statement?

Latest Update on 25th January, 2022 by Certification Course Answers

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.

Correct Answer:

  •  It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.

Latest Updates

No posts found in this category.