Answer:
Explanation:
Firstly, use sqrt method from Math package to calculate the square root of input n (Line 3). Cast the result to integer and assign it to sqrt_n variable.
Next, square the sqrt_n and check if it is equal to input n (Line 4). If so, return true, if not, return false (Line 4-8).