Scientific Computing with Python Projects - Budget App

In the main.py there is a test case of food, clothing and auto followed by call to the test module where it does a test with business, food and entertainment. If I comment out the test cases of food, clothing and auto then the my percent numbers match with expected percentage in the test_module otherwise the food numbers from the main file affect the percentage.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: Scientific Computing with Python Projects - Budget App

Link to the challenge:

It sounds like you are (ab)using global variables.

Thanks! I had a class variable to track total spent which of course would not get reset in the same run. I changed the code and it works now.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.