while True: znach=float(input('Задайте коэф.усиления = ')) if znach<17.5 or znach>23.8: print('Ошибка!') else: break