2 Number Calculator

This code will allow you to use many operations with 2 numbers, not just the 4 basic operations!

print("Please insert two numbers and what you want to do with them") a = float(input("Please enter Number a here")) b = float(input("Please enter Number b here")) Operation = input("Please enter operation here. Please use the words Addition, Subtraction, Division, Multiplication, " "Square Root of a, Square Root of b, a choose b, b choose a,\n a to the power of b, and b to the" "power of a. If you don't want 2 numbers, please enter a random number in that slot. Thank you.") if Operation == "Addition": print(a+b) elif Operation == "Subtraction": print(a-b) elif Operation == "Division": print(a/b) elif Operation == "Multiplication": print(a*b) elif Operation == "a choose b": c = math.comb(int(a), int(b)) print(c) elif Operation == "b choose a": d = math.comb(int(b), int(a)) print(d) elif Operation == "a to the power of b": g = pow(int(a), int(b)) print(g) elif Operation == "b to the power of a": h = math.comb(int(b), int(a)) print(h) elif Operation == "Square root of a": j = math.sqrt(int(a)) print(j) elif Operation == "Square root of b": k = math.sqrt(int(b)) print(k) else: print("The operation given is not valid. Please try again.")

Calculator

This is a two number calculator which adds, subtracts, multiplies, and divides two numbers (whole and decimal)/

1