Python: Basic: Is Prime

Write the function is_prime that takes an integer n and returns a boolean whether n is a prime number or not.


is_prime(7) -> True
is_prime(10) -> False

Test 1    

Test 2    

Test 3    

Test 4    

Test 5    

Test 6