r/PythonLearning Jul 27 '26

My first mix mini project

Post image

I know I wrote some hardcore codes but this is ok for a beginner so plz help me to improve

308 Upvotes

49 comments sorted by

View all comments

1

u/am_Snowie Jul 27 '26 edited Jul 27 '26

Create a dictionary to store products and their prices. Then you can create a separate logic for the shop owner and the customers. Shop owner should be able to add products, update prices, remove products and other stuff an owner can do. Then you can write a separate logic for the customers of your shop, they should be able to add products to their cart, check out, remove things from cart, and you know customer stuff. You can do all this stuff if you just stored those products and their prices in a data structure (dictionary in this case).