Multiple choice technology operating systems

Consider the script
let i=2
while (( i <= ($l - 1) )); do
if (( ($l % i ) == 0 )); then
print $i $l $?
break;
fi
let i=i+1
done

What is the program all about and what are the possible outputs?

  1. checks prime number; returns one when not prime and zero when prime

  2. checks prime number; returns none when not prime and zero when prime

  3. checks prime number; returns zero when not prime and one when prime

  4. checks prime number; returns zero when not prime and none when prime

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This is a duplicate of question 136523. The script tests if $l is prime by checking divisibility. If divisible (not prime), it prints and exits with status 0. If no divisor found (prime), loop ends with exit status 1 from the last comparison. Output appears when not prime, none when prime.