All problems
Complement of At Least One
Problem
The probability that none of the possible events occurs is 1 minus the probability that at least one occurs.
Given the probability of at least one event, return the probability of none.
Hint
Two outcomes partition the space.
Test cases
case 1
in: [0.3]
expected: 0.7
case 2
in: [0]
expected: 1
case 3
in: [1]
expected: 0
Starter codePython
def complement_of_at_least_one(p_at_least_one):
# Your code here
pass3 test cases · run your code against them in the editor