What is the purpose of an if/else statement?

Advertisement

  • 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.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend