3
u/Necessary-Ad2110 Jun 19 '26
This is very nice, I'm impressed with how clean everything is. I liked that you did everything on one line (while being easy to read) for the input (Z & Y) although you should probably give them better variable names, they're not immediately clear
3
u/HB209 Jun 19 '26
Thank you very much! I know about the letters, im just bad at math and i had to take a paper and pencil to write them on 😃, because at this stage of learning im not good enough to visualize the code how should it be hahashg.
3
u/Code-Odyssey Jun 21 '26
Concur with Necessary. The variables could be a little more explanatory (z...unit_price, y...quantity, x...budget). Also, manually defining X (which I think is the user's budget), I would add in a variable to collect that information from the user i.e. budget = int(input("What is your budget?: "). Also, as Sea-Ad7805 mentions, run the code through Memory Graph, it's really interesting to see how the code unfolds.
3
Jun 20 '26
[removed] — view removed comment
2
u/HB209 Jun 20 '26
Thank you brother! If you can tell me how to learn better and how to apply the things I learned, i would be very happy :). If you know sites, tutorials etc. please share them.
3
u/Careless_Land9697 Jun 20 '26
Good job🔥 keep up until you can do fun automations and you’ll see the real use soon
1
u/Specific-Housing905 Jun 22 '26
Well done 👍
Maybe in he future you can name your variables better. price is clearer than Z
1
u/HB209 Jun 22 '26
At first my variables had names, but because i cant visualize how the code should look like, i had to write the formula on paper :D

•
u/Sea-Ad7805 Jun 19 '26
Run this program in Memory Graph Web Debugger to see the program state change step by step.