Hi, I have just built my 3rd project Budget App and would love to hear feedback on the code I have written
The code to my project is given below:
It would be helpful if you have given some feedback on the code
Have a good day
Hi, I have just built my 3rd project Budget App and would love to hear feedback on the code I have written
The code to my project is given below:
It would be helpful if you have given some feedback on the code
Have a good day
Really good approach @Ganesh_27
Your code is optimal
can you explain me what is the purpose of __str__ function
?
how it helps to print the bill
Hi @ShreyasSubhedar tq for your feedback.
This function basically returns the string representation . As mentioned in requirements the string representation should a return a string when str() is used.
It first prints the ‘*’ with category name and then all the ledger operations
if I add another category or say the fourth one category then your code will not print exact “-” character.
I suggest changing line 105 to:
s += " " + ("-" * ((len(categories) * 3) + 1))+ "\n"