In a polygon no of daignols equal to C(n,2) -n where n is no of sides
therefore 27 = C(n,2)
n(n-1)/2 -n =27
n∧2 -3n -54 =0
from above we get two values of n -6 and 9
no of sides cant we negative so 9 is the answer.
or you can simply solve by
n(n-3)/2 = no of daigonals