c1_W3 AssertionError

hello,
I am currently working on Week 3 Exercise 1" get_sub_volume" , and I am encountering an issue that I have been unable to resolve despite multiple attempts.

I have carefully reviewed my code and examined all the variables, but I am still receiving the following error: “AssertionError: Not all tests were passed for get_sub_volume. Check your equations and avoid using global variables inside the function.”

I kindly request your assistance in identifying the source of this error and guiding me towards a resolution. I would greatly appreciate any insights or guidance you can provide to help me address this challenge successfully.

thank you

Can you share the screenshot of the error log you are encountering. It gives a lot of detail to where you need to look for correcting your codes.

AssertionError: Not all tests were passed for get_sub_volume. Check your equations and avoid using global variables inside the function.”

Check this post, it might help you. The learner had the code error log, although there were two mistakes in his codes.

Regards
DP

Thanks, I fixed the error by using np.random.randint instead of random.randint . This might help others facing a similar problem."