I have the following code:
import math
q = input("Is there a square root in the function? (y,n) ")
if q == "y":
base = input("base? ")
x_value = input("x? ")
print (math.log(math.sqrt(base),x_value))
else:
base_2 = input("base? ")
x_value_2 = input("x? ")
print (math.log(base_2, x_value_2))
When I run the code, it says that the second value in math.log() must be a number. Shouldn't it work if I just use the variable I assigned to it?