In your function
do the following.
get_valid_cable_size
you dont need a try except and you are not asking for a value in your loop so it gets stuck in a n infinite loop.do the following.
- start a while loop
- call the function
get_valid_input
to get a value from user input
- check if the value is in acceptable cable sizes
- if it is return the value
- else tell the user to input a correct value and it will go back to the start of this loop
- if it is return the value