Raising exceptions Q2 | SoloLearn: Learn to code for FREE!

0

Raising exceptions Q2

I'm sorry, but this question does not make sense to me. How does it work

11/2/2018 8:30:46 PM

Harris

2 Answers

New Answer

0

Do you mean the question in the tutorial where you are asked to 'raise a ValueError'? Python gives you an error when you write stuff that doesn't work, like when you try to add a number to a string. A number below zero (as in the example) normally is no reason for Python to call out an exception - unless you specifically say so in your code by calling that Exception yourself with raise.

0

Can you please provide more context and be more specific about which part you are hung up on?