Looking for trustworthy answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

When you are trying to anticipate user errors, which do you think is better to use—an if else statement or a try except statement? Why? Can you think of a rule that you could follow to determine which you should use?

Sagot :

Answer:

try except

Explanation:

You shouldn't use an if else statement for anticipating user errors since try-except was made for executing statements until encountering an error, while if-else is checking for a condition and if its not met, it will do an else.