generate functionWed, 03 May 2023

ingresar un numero de 2 cifras y visualizar la suma de sus cifras

def sum_digits(n): sum = 0 while n: sum += n % 10 n //= 10 return sum sum_digits(123)

Questions about programming?Chat with your personal AI assistant