input("Welcome to this calculator, press ENTER to continue")
operation = input("Type one : Add Subtract Multiply Divide ");
firstNumber = input("Type the first number you want to " + operation + " ");
secondNumber = input("Type the second number ");
if operation == "add" or "Add":
finalNumber = int(firstNumber) + int(secondNumber); finalNumberString = str(finalNumber); newOperation = "adding "
elif operation == "multiply" or "Muptiply":
finalNumber = int(firstNumber) * int(secondNumber); finalNumberString = str(finalNumber); newOperation = "multiplying "
else:
print("Not Yet Implemented")
print("Your result of " + newOperation + firstNumber + " to " + secondNumber + " was " + finalNumberString)
When I run the script and try to multiply, it ends up adding them and prints "adding" instead of "multiplying"
Welcome to this calculator, press ENTER to continue
Type one : Add Subtract Multiply Divide Multiply
Type the first number you want to Multiply 10
Type the second number 5
Your result of adding 10 to 5 was 15