rewrote code and is much better now. Just type in your equation. Works better with no spaces. May glitch on first entry.
It says invalid syntax on the last line. Can someone tell me why?
first python project i’ve ever made
FloCal35 Nice job, one thing to point out. Add a .lower() to the end of your operation variable. Then change the strings in the if statement to "add", "subtract", etc. That way, whether the user says "add","Add",or "ADD", the if statement will still run operation=input("Which operation? (Add, subtract, etc.)").lower() then if operation=="add": ... elif operation=="subtract": ... > [And so on]2 years ago
My first python project; a basic calculator.
RhinoRunner str(input()) is not needed, by default input variables will be strings, so you can just do input() instead of str(input()). Also, if you use float instead of int you can use decimals. It is cool that this is more than just a 4-function calculator.2 years ago