Nondeterministic Polynomial Algorithm All code are in python is Prime Number (Polynomial Time to accomplish is relative with the power of computer's computation) print(is_prime(1331))