generate functionWed, 03 May 2023

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

def add_digits(num): sum = 0 while num > 0: sum += num % 10 num //= 10 return sum add_digits(123)

Questions about programming?Chat with your personal AI assistant