I want to assign random numbers and then choose only those where 360 mod random number ==0. Is mod a valid operator?

I have tried the following

Context("Numeric");

$e=random(10,60,1); #assigns measure of exterior angle

#$n=Compute("360/$e"); #finds number of sides of polygon

#not all values will give a regular polygon. Must be factors of 360.

if (360%$e==0) { $e = $e;}

else {$e=$s+1;}

When I try problem my random number is always 1.