You can download this code by clicking the button below.
This code is now available for download.
Determine if an integer is a prime number.
Technology Stack : math, re
Code Type : Function
Code Difficulty : Intermediate
import math
import re
import datetime
import random
import json
import os
import shutil
def is_prime_number(n):
if n <= 1:
return False
for i in range(2, int(math.sqrt(n)) + 1):
if n % i == 0:
return False
return True