3
u/que_importa Sep 22 '25
one thing that could be useful is to consider .lower or .upper for the user inputs and validations
1
3
u/SalutMonYoup Sep 22 '25
Quite simple program (good nonetheless) a tip for you would be to split your program, like instead of putting all the logic in a single function I would have something more chunked to keep the program easier to maintain and readable, intention is key when programming. So for example instead of all the logic directly beneath every if statement I would have created an « add_item_to_cart() » method that would carry the logic of adding an item, same for the "2" I would have moved the logic inside an remove_item_from_cart() and so on.
Splitting your code will greatly improve readability and maintainability of a program. For such a simple one it is not necessary but still a good habit to take, being able to think of your program as a group of différents function instead of a huge function that would do everything!
Keep going!
2
2
u/Key_Translator7839 Sep 23 '25
I will have to use the split function in my projects from now on, thank you!
3
u/Embarrassed-Mess-198 Sep 25 '25
christ, these teenagers with their hipster programming languages.
This is not how you make a shopping list. You use a pen and paper for crists sake
2
u/Mileage-25 Sep 23 '25
same here. I'm also at day 5 but I'm still learning basic syntax.
2
u/fatimalizade Sep 23 '25
Good luck🤞🏻
2
2
1




7
u/Adrewmc Sep 22 '25
Looks fine to me at this level.
I would suggest learning about dictionaries next.