Module 7
ValueError
When a value is the wrong type.
Wrong kind of value
ValueError occurs when a value is the right type but an inappropriate value. For example, converting a non-numeric string to an integer.
Python
try:
num = int("hello")
except ValueError:
print("That is not a valid number")→ That is not a valid number
What does ValueError indicate?