I essentially need to make a simple calculator, that, when two sides are entered, it produces the third. I'm having a bit of a problem with the sqrt function. This is what I have so far
import math
print("It's triangle fun time! Enter the numbers you know, and a ? for the number you don't.")
sideA = int(input("Side A: "))
sideB = int(input("Side B: "))
sideC = int(input("Hypotenuse: "))
if sideA == ("?"):
print("Side A =", sideC ** 2 - sideB**2)
elif sideB == ("?"):
print("Side B =", sideC ** 2 - sideA**2)
elif sideC == ("?"):
print("Side C =", math.sqrt(sideA)**2 + (sideB)**2)
Any help would be much appreciated!
Edit - code updated
(there are not spaces between sideC and ** and 2, but it was bolding it so I changed it)