Thanks Junilu.
So Ehtisham, I suggest you work through your code with a
test value, say 7 which we know is a prime.
In isprime() argument guess is 7, and when i=0, the condition (i!=guess) is true so the function returns false; not a good start
You need to modify your test(s), and check them by hand until you are happy they give the correct result for a few known primes and non-primes. For starters, you don't know if a number is prime or not until you have tested for division by all numbers in the for() range, so I don't think you can return true inside the loop.