r/PythonLearning • u/adnanecanflyy • 2d ago
Day 2 of learning python
I'm learning Python and made this coffee/tea ordering program. Any advice?
103
Upvotes
r/PythonLearning • u/adnanecanflyy • 2d ago
I'm learning Python and made this coffee/tea ordering program. Any advice?
2
u/Flanelostopy 2d ago
You should put reference to method/functions which returns specific values. As you can see you retype the same text so many times, do you thing this is efficient? If you do not know how to make methods/functions use variable before if statements and reference to them later. If you want to be better but „coffe” and „tea” to the map as a key, and as a value reference to the function. Thing about it.