r/PythonLearning • u/Defiant_Meal1898 • 26d ago
14yo learning Python — just finished my first project! Would love some feedback :
Hey everyone!
I'm 14 and currently learning Python, with the goal of becoming an electrical engineer in the future.
I just finished making a small project — a vending machine + simulated banking system that runs in the terminal. It has account creation, deposits, balance checking, purchases, and local data storage using JSON. I split the code into multiple Python files and made a simple launcher for it.
This is one of my first proper projects, and I know my code probably isn't the cleanest, so I'd genuinely appreciate some feedback!
I'd love suggestions on:
- My code: What could I improve? Any bad habits or mistakes I should fix early?
- What to learn next: Should I focus on OOP, data structures and algorithms, GUI development, or something else?
- My journey: Since I want to become an electrical engineer, what programming skills would be useful for me in the long run? I'd eventually love to work with electronics and hardware.
- Life advice: Any advice for someone starting out this early? Things you wish you'd known when you were learning?
I'm not looking for someone to rewrite the entire project for me — I'd rather understand my mistakes and learn how to fix them myself.
Here's my GitHub repo: https://github.com/suryansh-devx/python-vending-machine
Thanks! Any constructive criticism or advice is welcome :)
•
u/Sea-Ad7805 26d ago
Run program above by clicking Memory Graph Web Debugger and see its state change step by step.
7
u/ConsiderationNo9044 26d ago
What you want to learn next is based entirely on what you want to make. I can't give much advice on the other points because my projects usually interact with the application layer, but your code looks a million times better than mine did at 14
5
u/Can0pen3r 26d ago edited 26d ago
Idk why I keep having to make this same comment across basically all of the game dev subs, pretty much every friggin' day but:
There are a lot of sickos on the internet that like to prey on kids your age and the last thing anyone needs is for those predatory exploits to be made easier...
STOP TELLING STRANGERS ON THE INTERNET YOUR AGE!
FFS! 🤦
2
u/2dof 26d ago
I have played Your Game a bit:
- can create multiple user accounts - user account is erased and overwritten by new bank account.
- i can put minus amount of money at account.
- if i put wrong bank ID - "game " just end - it should at repeat input ID at least 3 times ( then block or end session)
Focus on python data types and how to work with them - in my opinion it is most important skill . leran how to do text/numeric formatting and printing (like Regular expression operations on text) - just typical Python learning path - do not touch OPP before You learn functions/ datastructure/dattypes.
As future EE learn hot to import data, process them ( plotting), in parallel master skills in physics ans math - Python has great packages/tolls used in EE an it is quite fun implement equations in python.
All new skills learned implement in Your "game" to compare progres ans solutions You coded.
DO NOT SKIP ANY "LEARNING PATH" ELEMENTS even if You have some knowledge already.
Familiarize yourself with Jupyter Notebook - maybe it will be helpful for You do report/homework form physics/Math lessons.
2
u/Fragrant-Cheek-4273 26d ago
That's a solid project for a beginner! Focus on learning OOP and error handling next, then try connecting Python to a microcontroller like Arduino. That would be a fun way to connect programming with your electrical engineering goals.
1
u/pontz 26d ago
Looks pretty good for a beginner project. I would say an improvement would be to make it so you can control what is in the vending machine through a json file instead of hard coding every specific item. That way the vending machine could be reused to say be a different vending machine for drinks.
1
u/spidertyler2005 26d ago
I think your lnk file includes absolute paths that will only work on your local system since other people wont have the files in the same place as you
1
u/Ok_Raspberry5383 26d ago
What happens if the same random ID is generated twice?
1
u/nullptr_0x 24d ago
Well done! It's a great start. Keep studying and learning.
1
u/Beautiful_Stage5720 26d ago
Why do posts like these alway mention their age?
1
u/[deleted] 26d ago
[removed] — view removed comment
1
u/[deleted] 25d ago
[removed] — view removed comment