Catching Exceptions

Question no. 73

I did not understand.

Try condition is executed but except condition does not.

Please clarify

Please reply here also.

Please read the error message. You haven’t defined u anywhere.

i defind (num)

that means when i give any number it will executed handling Try and give me a number.

But if i give any string it should print the except condition.

it is giving me error.

Why??

Please read the chapter on variable again.
To use a variable in python you need to assign a value to it first.

I have assigned num to function defination.

Then what should i defind ??

Please clarify.