Why does the raised exception not get printed out? | Sololearn: Learn to code for FREE!

+2

Why does the raised exception not get printed out?

Exceptions https://code.sololearn.com/c2L2PAXydRWM/?ref=app

try

4/16/2021 7:31:02 PM

Obinna Anosike

4 Answers

New Answer

+4

You are raising an exception at wrong place because there is no exception in try block so except is not going to execute thus no exceptions occurred in this code. Because of no exception it going to print nothing other than outputs from print statement. Raise exception in try block you will definitely get trackback of exception

+3

First is evaluated and expression - it is true and if first side of or expression is true it skip the second

+2

But if you look at the fourth line of the code, one side says or g

+1

cause the try block was ok