Prime number

We have to write a loop statement to find the absolute value of a number and then find out if it is prime or not. I am not sure what I am doing wrong but it only prints out that everything is not a prime number. Here is part of the code that I am working on

Also, the loop includes prime in its bounds, so as well as checking (prime % 1 == 0), it's checking (prime % prime == 0), which are always true for primes. Your loop only needs to go halfway to prime, by the way, since the smallest factor other than 1 that a composite number could have is 2.