So I have this program to convert a binary to hex. I also have a part that returns a value error if you put in a non 0 or 1 or if the string is more or less than 8 digits.
But what I want now with it is if the program does get the value error how do I code it so that it automatically restarts after the value error.
Enclose the code in a while loop.
This should allow your program to repeat until it runs without errors.