Hello,
I want to share my way of checking security factors and degrees of utilisations with handcalcs:
pass_latex = r"$\mathbf{\color{green}\checkmark}$"
fail_latex = r"$\mathbf{\color{red} !}$"
def check_DoU(DoU):
check = fail_latex
operator = ">"
if DoU <= 1:
check = pass_latex
operator = "\\leq"
return f"{round(DoU,2)} {operator} 1 \\quad {check}"
def check_S(S_ist, S_soll):
check = fail_latex
operator = "<"
if S_ist >= S_soll:
check = pass_latex
operator = "\\geq"
return f"{round(S_ist,1)} {operator} {S_soll} \\quad {check}"
E.g.:
