C3_W1_Exercise 6

In defining the function, I am not sure what this code below is asking me to do; any guidance here:

Multiply by probability of current feature

    probability *= None

Hi @Trevor_Thompson1!

This is a common syntax in Python, it means the same as

probability = probability*None

So, what the assignment is asking you is which value you have to update the probability.

I hope that helps.


Thanks Lucas. I literally realized that a few minutes after my post.

In general, in the notebooks you’re asked to replace “None” by the appropriate code to complete the function, according to the instructions.

Well I know the exact parameter to replace, but it is showing this error :

local variable ‘********’ referenced before assignment.

How can I solve this ?

Hi @Akhil_Pothanapalli ,

Could you post a fresh query with error trace back, as your error may not be the same with this thread which is 7 months old.

Thank you @Kic , but I’ve resolved my issue, small error in code from side.