add ex-1.16 1.17 1.18 and prime test function in textbook