Build an algorithm in Python to identify if a given number is a perfect square.
25
import math

def is_perfect_square(num):
    sqrt = int(math.sqrt(num))
    return sqrt * sqrt == num

result = is_perfect_square(25)
print(result)