Computer Science

Following expression does not report an error even if it has a sub-expression with 'divide by zero' problem:

3 or 10/0

What changes can you make to above expression so that Python reports this error?

Python Data Handling

23 Likes

Answer

Interchanging the operands of or operator as shown below will make Python report this error:

10/0 or 3

Answered By

12 Likes


Related Questions