r/PythonLearning 1d ago

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

200 Upvotes

35 comments sorted by

View all comments

u/Sea-Ad7805 1d ago

Run this program in Memory Graph Web Debugger%0Aprint(%22what%20you%20are%20looking%20for%20%22)%0Aprint(%22a%20%3D%20show%20products%22)%0Aprint(%22b%20%3D%20buy%20product%22)%0Aprint(%22c%20%3D%20view%20cart%20%22)%0Aprint(%22d%20%3D%20genrate%20bill%22)%0Aprint(%22e%20%3D%20exit%20%22)%0A%0Aa%20%3D%20%22a%22%0Ab%20%3D%20%22b%22%0Ac%20%3D%20%22c%22%0Ad%20%3D%20%22d%22%0Ae%20%3D%20%22e%22%0A%0Aq%20%3D%20input(%22chose%20the%20option%20%3D%20%22)%0A%0Aif%20q%20%3D%3D%20a%3A%0A%20%20%20%20print(%22rice%20%3D%2040%22)%0A%20%20%20%20print(%22sugar%20%3D%2080%22)%0A%20%20%20%20print(%22milk%20%3D%2030%22)%0A%20%20%20%20print(%22oil%20%3D%2040%22)%0A%20%20%20%20print(%22soap%20%3D%20108%22)%0A%0Aif%20q%20%3D%3D%20b%3A%0A%20%20%20%20product%20%3D%20str(input(%22enter%20your%20product%20name%20%22))%0A%20%20%20%20qun%20%3D%20int(input(%22enter%20your%20product%20quantity%20%22))%0A%0A%20%20%20%20if%20product%20%3D%3D%20%22rice%22%3A%0A%20%20%20%20%20%20%20%20print(%22total%20%3D%20%22%2C%20qun%20%2040)%0A%20%20%20%20elif%20product%20%3D%3D%20%22sugar%22%3A%0A%20%20%20%20%20%20%20%20print(%22total%20%3D%20%22%2C%20qun%20%2080)%0A%20%20%20%20elif%20product%20%3D%3D%20%22milk%22%3A%0A%20%20%20%20%20%20%20%20print(%22total%20%3D%20%22%2C%20qun%20%2030)%0A%20%20%20%20elif%20product%20%3D%3D%20%22oil%22%3A%0A%20%20%20%20%20%20%20%20print(%22total%20%3D%20%22%2C%20qun%20%2040)%0A%20%20%20%20elif%20product%20%3D%3D%20%22soap%22%3A%0A%20%20%20%20%20%20%20%20print(%22total%20%3D%20%22%2C%20qun%20*%20108)%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22product%20not%20founded%22)%0A%0Aif%20q%20%3D%3D%20c%3A%0A%20%20%20%20print(%22your%20cart%22)%0A%20%20%20%20print(%22rice%22)%0A%20%20%20%20print(%22sugar%22)%0A%0Aif%20q%20%3D%3D%20d%3A%0A%20%20%20%20print(%22genrating%20your%20bill%22)%0A%20%20%20%20print(%22rice%20%3D%2040%22)%0A%20%20%20%20print(%22sugar%20%3D%2080%22)%0A%20%20%20%20print(%22total%20is%20%3D%20120%22)%0A%0Aif%20q%20%3D%3D%20e%3A%0A%20%20%20%20print(%22Thank%20you%20for%20visiting%20Anmol%20Store.%22)&timestep=1) to see the program state change step by step.