this calculator is not that good. It only has addition, subtraction, multiplication, division and exponents.
I WANT TO HEAR WANT YOU THINK!!!!
TL;DR: Basically, instead of going step by step, asking questions about what operator and operands to use, take this code and run it on an input. Then figure it using if statements.
Basically, here's how to use this function.
1. Take an input and store it to a variable (let's call it
calcInput), wrapping it in the function from earlier. The line should look something like
calcInput = breakDownExpression(input("Please enter an expression (eg. 1+1): "))
2. Then, assign the tuple elements to your first, second and user_input variables. So
first = calcInput,
user_input = calcInput,
second = calcInput.
3. Just change your
if statements. So instead of
if user_input == '1':, use
if user_input == '+':, and
if user_input == '2': becomes
if user_input == '-':, et cetera.
You can keep everything else. Good luck, blackjkl!