I'm a beginner but this is how I got your code to work:
Raw_input produces strings. You need to convert leg1 and leg2 to ints or floats before you can use them in sqrt. You can do that like this:
leg1 = int(input("# "))
You've got the same problem but in reverse in print (python is expecting a str but getting a float). You're also missing an operator in print.
It might be easier to just create a new variable for the result of sqrt, convert it to a str, and then use the variable in print.
hypotenuse = str(sqrt((leg1 ** 2) + (leg2 ** 2)))