python – Please what’s wrong with my code ? im trying to find The next prime number of a given (nb)

i write this code to get the next prime number of a given (nb), and its not work, please can i know where’s the problem ? i’m a novice in World and i’m trying to solve this exercise for days now without any result.
thanks in advance.


int ft_is_prime(int nb)
{
    int i;

    i = 2;
    if (nb <= 1)
        return (0);

    while (i <= nb / i)
    {
        if ((nb % i) == 0)
            return (0);
        i++;
    }
    return (1);
}

int ft_find_next_prime(int nb)
{
    if (!(ft_is_prime(nb)))
        nb++;
    return (nb);
}