Revision 3233e951-63a2-45bb-8f50-0b12e7897b28 - Stack Overflow
I'm trying to solve this problem:
> Enter two numbers from keyboard with at least three digits.
>
> Print the number that have the digits sum greater.
Inside of a function I have tried to print the values of variables.
The values of those variables is not printed, so I think that the function is not being executed.
a = input('\n Enter the first number : ' )
x = sum([a])
print('\n The sum of the digits number ' +str(x)+ ' este : %d' %x)
b = input('\n Enter the second number : ')
y = sum([b])
print('\n The sum of the digits number ' +str(y)+ ' este : %d' %y)
def sum(param):
var = 0
while(param != 0):
var += (param % 10)
print(var)
param /= 10
print(param)
return var