I'm stuck on a question for an assignment for school. Am i missing something with python
I am running my input's in a while loop and when a value error is thrown. I want to return to the last question asked. but every time it restarts from the beginning of the code.
while True:
try:
start_value = int(input('Enter a start value (Default: 0): ') or 0)
end_value = int(input('Enter a end value: '))
step_value = int(input('Enter step value (Default: 1): ') or '1')
except ValueError:
print('Numeric value only!')
continue
else:
for x in range(start_value, end_value, step_value):
print(str(x), end=' ')
break
can anyone point me in the right direction. I have looked all over and only examples i can find are while loops only with one input in the try statement