Answer:
// program in python
# import math library
import math
#read input from user
num=int(input("enter an integer:"))
while True:
#find square root on input
  s_root=math.sqrt(num)
#find remainder of root
  r=s_root%1
#if remainder if 0 then perfect square
  if r==0:
    print("square root of the number is:",s_root)
    break
  else:
#if number is not perfect square then ask again
    num=int(input("input is not perfect square !!enter an integer again:"))
Explanation:
Read an integer from user.Find the square root of the input number and then find  the remainder of square root by modulo 1.If the remainder is 0 then number is perfect square otherwise ask user to enter an integer again until user enter a perfect square  number.
Output:
enter an integer:12 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
input is not perfect square !!enter an integer again:16 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
square root of the number is: 4.0 Â Â