r/learnpython • u/Valuable_Corner4797 • 8d ago
Easy Calculator (Python) :)
I didn't like the Windows Calculator, so I decided to develop my own CMD-based calculator. It's open-source, so anyone is welcome to use it!
0
Upvotes
1
u/Educational-Paper-75 8d ago
Why not ask for the control words when you ask for the first float a. Saves the user having to enter a float he has no intention of using. You may also be able to refactor the main while loop getting rid of yeni and some of the continue or break statements. And use elif when appropriate.
2
u/CptBadAss2016 8d ago
Look into the "shunting yard algorithm"
2
u/obvious_apple 6d ago
My calculator is a python shell since 2005
1
u/TheRNGuy 8d ago
You need UI and use OOP, events instead of
whileloop.-1
u/Educational_Virus672 8d ago
its nice seeing someone try something like this but im gonna be honest your better off using eval, i see your your problem solving potential but in programming some thigns like this is almost always exist and a programmer should learn to research and adapt keep up the work!
-2
u/No-Formal7513 8d ago
good job, I saw the source code, and well....I am a Java guy, so sorry for that, I couldn't break down your source code to understand
But hey, It also have a good presentation, here is my Github:
https://github.com/Aditya120910
can visit it, if you like to