Beispiel #1
0
 def test_diam2(val: float) -> bool:
     return (is_positive(val)
             and is_this(val != diam1.value, "Can't be equal to #1"))
Beispiel #2
0
 def test_number(number: int) -> bool:
     return is_this(number > 1, 'Введите число больше единицы.')
Beispiel #3
0
 def test_thickness(val: float) -> bool:
     return (is_positive(val)
             and is_this(val < diam.value / 2,
                         'Значение должно быть меньне половины диаметра'))
Beispiel #4
0
 def is_nozero(number: float) -> bool:
     return is_this(number != 0, 'Не может быть нулём')
Beispiel #5
0
 def test_y2(value: float) -> bool:
     return is_this(
         x1_coor.value != x2_coor.value or y1_coor.value != value,
         'Введите координаты двух разных точек.')
Beispiel #6
0
 def test_qty_b(value: float) -> bool:
     return is_positive(value) and \
         is_this(value != qty_a.value, 'Не может быть равным N1')
Beispiel #7
0
 def check_inn_diam(val: float) -> bool:
     return is_positive_or_zero(val) and is_this(
         val < ext_diam.value, 'Не может быть меньше наружного диаметра')