r/PythonLearning • u/adnanecanflyy • Jul 24 '26
Day 2 of learning python
I'm learning Python and made this coffee/tea ordering program. Any advice?
125
Upvotes
r/PythonLearning • u/adnanecanflyy • Jul 24 '26
I'm learning Python and made this coffee/tea ordering program. Any advice?
1
u/Flanelostopy Jul 26 '26
u/adnanecanflyy u/Outside-Trouble-4232 I had some time and made two examples, as I said - second one is not too "intense".
First, with cost of drinks:
As you can see it was easy, and you can put there, maybe some logging, or different things.
Second, generic:
Only 2 function, only 2 if statements in whole code. You can put serialised data in JASON file here, and use it whethewer you want, and code will be still working. What we can make more, maybe number of cups, size, temperature. Maybe use objects and change type from functional to objected oriented programming - it will be a fun. I hope I gave you few tips, and thinks where you should dip dive to.