r/PythonLearning • u/sonikk1 • Aug 31 '25
Day 41 of learning python
I needed 41 days to completely be able to get a task and write it completely from my head, not looking to my notes or using ChatGPT, search engines etc..
Also, function defining is something i added just because i felt i wanna try out. I got that idea randomly. I was like: "Wait, i remember what i read in lecture about functions, let me try this." And it totally worked.
This was the task:
The user enters a sequence of numbers until they type "stop".
The program creates three lists: positive*,* negative*, and* zeros*.*
It prints the sum, average, minimum, and maximum number for each list.
Please let me know your thoughts. Also:
What should i learn next that can get this to a new level?
Was there a mistake in my code when it comes to coding style?
Is there a more simple solution for my problem then my own?
Thanks
6
u/SCD_minecraft Aug 31 '25
Looks good
But...!
You never actually use end variable :p
You don't need to, but if you want to make a constant, you can write it in all uppercase. end -> END. On runtime this doesn't change anything, but future editors/readers will knoa that END variable isn't ment to be changed, that it is a constant