y^2-7y+p. Find the value of p that it becomes a perfect square algebra

(y-a)^2 = y^2 - 7 y + p

y^2 - 2 a + a^2 = y^2 - 7 y + p

2 a = 7

a = 7/2
so
p = a^2 = 49/4