6.is_prime


#1

If we take the range to be (2,x-1),won’t it only go till x-2 and exclude x-1 ?


#2

yes, it will. The instructions say to go till x - 1, but range already excludes x, so we don’t have to do minus one


#3

Thanks a lot.
This really helped :slightly_smiling_face:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.