Answer:
int1=int(input("Enter integer :\n"))#taking input of first number.
int2=float(input("Enter the power :\n"))#taking input of the power.
if int2 == 0.5 and int1<0:#condition for negative square root.
print("Cannot calculate the square root of negative numbers")#printing the message.
else:#else calculating the result.
res=int1**int2
print(res)
output:-
Enter integer :
-5
Enter the power :
0.5
Cannot calculate the square root of negative numbers
Explanation:
In the above program I have taken input of the number and the power.Since power can be decimal number taking it as float.If the number is negative and the power is 0.5 then printing the message for not calculating the value else calculating the value and storing it in the res printing the res.