def probability(x: float) -> float: if 0 <= x <= 1: return x else: return 0