how to use try and except for error changing code example Example: python exception try: # code block except ValueError as ve: print(ve)