Tip:
Highlight text to annotate it
X
So coin 1 has a probability of heads equals P₁ and coin 2 has a probability of heads equals P₂
and this may have now be different probabilities.
In a primary environment, they can account this by making 2 arguments separated by a comma,
for example, 0.5 and 0.8, and then the function takes as an input, 2 arguments, P₁ and P₂,
and they can use both of these variables in the return assignment.
Let’s now flip both coins and write the code that computes the probability
that coin 1 equals heads and coin 2 equals heads for example of 0.5 and 0.8, this would be?