I am getting this error on exercise 5:
UnboundLocalError: local variable ‘probability_f’ referenced before assignment
I have set the three earlier uses of probability_f equal to their corresponding pdf functions. I do not have much experience with match statements, so I am having trouble troubleshooting this error. I tried to look into earlier posts about this same error, but most of them ended up being resolved through DM. Can someone please give me some guidance on this?
Thank you
Edit: The error is referring to this part of the code:
I tried setting probability_f equal to a default value of 1.0 and it gave me the wrong output. The values just remained as 1.0. I believe the parameters are correct when I am calling the functions, so it’s probably the match that is incorrect, but I am not sure how to adjust it properly.