I’m using the built in uniform pdf function but the grade is 8 not 10 and the commentarie is below. I dont know where is the problem exactly. I tried if else but “prob_of_X_given_C” does not work and I recieve a message that x is a list and not a float so we cannot have a range of list. Even with uniform pdf built in function my “prob_of_X_given_C” give wrong results for all breed. Does “prob_of_X_given_C” affected by the above result of pdf_uniform?

I used:

Uniform.pdf(x, a, b) and one result was different from expected output:

When a=2 and b=10 for value 5.4 I get 0.100

This also makes the last exercise result different.