Ниже приведен код Python и изображение потоковой диаграммы.
Нужно ли включать в блок-схему «Пока» и «Попробовать» цикл?
def get_value():
while True:
try:
value = int(input('Please enter the value: '))
except ValueError:
print('ERROR: Invalid Input! Enter numeric data. \n')
continue
if (value < 1 or value > 100):
print('ERROR: Invalid Input! Enter value between 0 and 100\n')
else:
break
return value