how to rainse error in pyt code example
Example 1: python raise exception
# this raises a "NameError"
>>> raise NameError('HiThere')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: HiThere
Example 2: python exception
try:
# code block
except ValueError as ve:
print(ve)