A simple calculator for simple people. Without a calculator, i don't know what i would do in math. Probably fail...
I made my own calculator a while ago and this one has solve for x. Unfortunately it doesn't actually print the equation that you put in because I'm too lazy. Anyway the link to my calculator is https://repl.it/@3465728974563/Calculator if you want to use it. The solve for x took way too long and was a pain to make and I'm still trying to find anything I can add or improve to it.
Division by zero error, I reccomend putting a try function to prevent errors from appearing and messing up the script.
try: choice = input("Enter choice(1/2/3/4): ") num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: ")) if choice == '1': print(num1,"+",num2,"=", add(num1,num2)) elif choice == '2': print(num1,"-",num2,"=", subtract(num1,num2)) elif choice == '3': print(num1,"*",num2,"=", multiply(num1,num2)) elif choice == '4': print(num1,"/",num2,"=", divide(num1,num2)) else: print("Invalid input") except: print("An error occured!")