5 lines
99 B
Python
5 lines
99 B
Python
def probability(x: float) -> float:
|
|
if 0 <= x <= 1:
|
|
return x
|
|
else:
|
|
return 0 |