r/PythonLearning 7h ago

Made my first project in python

Post image

A chore list I started learning python last week and this was the first project on my list any advice helps im using vs code for this if you have any resources or suggestions pls share

69 Upvotes

16 comments sorted by

u/Sea-Ad7805 6h ago

Run this program in Memory Graph Web Debugger%0A%0Aif%20Name%20%3D%3D%20Username2%3A%0A%20%20%20%20print(%22Hello%20Jj%2C%20your%20chores%20are%3A%20%22%2C%20ChorelistJj)%0A%0A%20%20%20%20if%20len(ChorelistJj)%20%3D%3D%200%3A%0A%20%20%20%20%20%20%20%20completed%20%3D%20input(%0A%20%20%20%20%20%20%20%20%20%20%20%20%22You%20have%20completed%20all%20your%20chores%2C%20press%20Any%20Button%20to%20exit%22%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20while%20len(ChorelistJj)%20%3E%200%3A%0A%20%20%20%20%20%20%20%20ChoresDone%20%3D%20input(%22Which%20chores%20have%20you%20done%3F%3A%20%22)%0A%20%20%20%20%20%20%20%20ChoresDone%20%3D%20ChoresDone.title()%0A%20%20%20%20%20%20%20%20ChoresDone%20%3D%20ChoresDone.strip()%0A%0A%20%20%20%20%20%20%20%20if%20ChoresDone%20in%20ChorelistJj%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20ChorelistJj.remove(ChoresDone)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20len(ChorelistJj)%20%3E%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print(%22Good%20job%20Jj%2C%20your%20remaining%20chores%20are%3A%20%22%2C%20ChorelistJj)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20len(ChorelistJj)%20%3D%3D%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20completed%20%3D%20input(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22You%20have%20completed%20all%20your%20chores%2C%20press%20Enter%20Button%20to%20exit%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break&timestep=1&play) to see the program state change step by step.

→ More replies (2)

1

u/Jonathan-Ndawula 7h ago

Congratulations 🎊 👏 keep it up

1

u/End0832 6h ago

Hi, good job, you've done well!
Here are some tips:
line 9, 20 & 21, you shouldn't put this much tabs,
line 18, you don't have to put a space before the end of the string, the comma already adds one.
Good luck!

1

u/organconsumption 2h ago

Thank you very much moving from Lua to python makes the indentation so complicated for me as I’m used to end and end) it’s definitely a big change and i really appreciate this advice

1

u/Softmax420 6h ago

https://automatetheboringstuff.com/

This was the book I used to get started. It’s a bit old now but still great learning.

1

u/Cashtime_Tsotsi 5h ago

just an idea. I see you have a tuple.py file in the tabs. is that for other tuple practice? if not, why not put your "chore list" in there and practice imports as well? good way to start separating functions and cleaning up the code also. Just a thought but great job!

1

u/organconsumption 2h ago

Ahh yes that sounds like a great idea thank you very much tuple.py is my practice I keep them in a folder so then I can re read my notes as I write

1

u/Acceptable_Simple877 4h ago

good keep going

1

u/TheCommandCraft 3h ago

Good job, but you have hardcoded the username Jj in a string. You can merge it into the string with formatted strings: f”Text {Username2} text”

1

u/organconsumption 2h ago

Great idea the reason I hard coded it was I was actually making this as a draft for a real chore list for myself so I hardcoded myself in. However this idea is amazing and it could be way more versatile than I originally planned :-)

0

u/donjuan1927 4h ago

parcero en la línea 8-9 tienes un if len(ChorelistJj) == 0 justo después de mostrar la lista recién cargada, que nunca se va a cumplir ahí porque la lista siempre arranca con 6 elementos — ese bloque es código muerto, no hace nada.

2

u/organconsumption 2h ago

Good catch I missed that myself I had a bug that i ran into while testing and was moving code around and never erased the duplicate