0

HELP! Please how do I get to stop the error message in the console from showing?

I'm trying to catch the error whenever a non-numeric input is being inputted. But it still shows the error message. What's wrong with it? https://code.sololearn.com/cg3LrPtm4ziR/?ref=app

11th Nov 2022, 8:23 PM
Yemisi
Yemisi - avatar
4 Answers
+ 5
The code after the try-except block will always be executed. You could put it inside the try-part to make it only run, if there is no issue with the input.
11th Nov 2022, 8:29 PM
Lisa
Lisa - avatar
+ 4
The code ***after*** the try-except block will be always executed.
11th Nov 2022, 8:47 PM
Lisa
Lisa - avatar
0
Thanks, Lisa. It works when I put it in the try-part. How about if I put quit() at the end of "except"? I still wish to understand why the try-except block will always be executed but still outputs the error message without the "quit()" being added at the end of the except block though.
11th Nov 2022, 8:37 PM
Yemisi
Yemisi - avatar
0
Alright. Thank you so much, Lisa
11th Nov 2022, 9:15 PM
Yemisi
Yemisi - avatar