It looks like there are a couple of issues in your code. I’ve provided a corrected version
<REDACTED BY MOD>
Here are the changes made by me:
Removed the /* User Editable Region */ comments as they are not required in Python.
Added the calculation for total expenses in the ‘3’ option inside main().
Added an option ‘4’ to filter expenses by category and display the filtered expenses using the filter_expenses_by_category and print_expenses functions.
Added an if __name__ == "__main__": block to ensure that the main() function is only called when the script is run directly, not when it’s imported as a module.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
this are steps done going forward in the project, when you give help I suggest you check what step the camper is doing so you know what kind of help they need
I came to this topic because I had exactly written the code I was told for this step but it was not passing. I refreshed the page to see if I got the chance to type everything again. I retyped elif choice == '3': option. Reviewed the code on option 3. But to no luck.
When I was about to write my question here, I had a last look at my code and found out that within it I had written — by mistake — a letter (a) at the beginning of the line elif choice == '2':, like this:
This is only a reminder to really be careful with what you type.
And when you are stuck, just step back and start over from the beginning of the exercise. Go line by line. Erase the new code (all of it), if you get too much stuck. Retype everything carefully.