function isP=HW2_Solution_isprime(Ntest)
isP=1;
ii=2;
if Ntest==1 || Ntest==0 % I use || for "Or"
    isP=0;
end
if Ntest < 0
    error ('Please type a nonnegative integer number.')
end

for ii=2: Ntest-1
    if (Ntest/ii)==round(Ntest/ii)
        isP=0;
    end
end 

%we could also implement this as a while loop like this:
% while ii < Ntest-1
%     if (Ntest/ii)==round(Ntest/ii)
%         isP=0;
%     end
%     ii=ii+1;
% end




end