All problems
Parallel Reliability
Problem
Reliability of a parallel system that works when at least one component works:
R = 1 - product(1 - reliabilities).
An empty list returns 0.0.
Hint
The system fails only when all components fail.
Test cases
case 1
in: [[0.9,0.8]]
expected: 0.98
case 2
in: [[0.5,0.5]]
expected: 0.75
case 3
in: [[]]
expected: 0
case 4
in: [[1,0.3]]
expected: 1
Starter codePython
def parallel_reliability(reliabilities):
# Your code here
pass4 test cases · run your code against them in the editor