The sum of all the exterior angles in any polygon is always 360 degrees.
Because the number of sides in a polygon is equal to the number of exterior angles, I can say that the number of exterior angles is x, which also means that there are x sides.
40x = 360
x = 9
This is a nine sided regular polygon!
I hope this helped,
Supermanaccz