r/learnpython • • 3d 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!

https://github.com/PASACore/Calculator_CMD_

1 Upvotes

12 comments sorted by

View all comments

1

u/Educational-Paper-75 3d 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.

3

u/Valuable_Corner4797 3d ago

This idea had never occurred to me; I will adjust the code based on what you’ve suggested.