What is the error in this code?

{mentor edit: deleted an image containing assignment code}

Hi @Anish_Das123!
You are getting the error because the variable num_observations hasn’t been created yet.

If you had already defined num_observations previously in the code and assigned it a numeric value, then your code would run without issues.

thank you very much

@Anish_Das123, please do not share your code on the forum.
That is not allowed by the Code of Conduct.