Is there something wrong?


#1
def somme_chiffre(n):
    s = 0
    while n:
        s += n % 10
        n /= 10
    return s

I wrote this code and it's still calling an error...


#2

same for me:

def somme_chiffre(n) :
    res = 0
    while n > 0 :
        res += n % 10
        n //= 10
    return res

I get "'int' object is not callable" error.