def is_prime(num : int) -> bool:
    """
    Checks if a number is prime or not.

    Parameters:
         num: the number to be checked

    Returns:
        True if number is prime, otherwise False
    """
    flag : bool = True

    if num <= 0:
        raise ValueError("Input argument should be a natural number")
    elif num == 1:
        flag = False 
    else:
        # check for factors
        for i in range(2, num):
            if (num % i) == 0:
                flag = False
                break
    return flag