def zad1(n):
l = []
while n > 1:
l.append(n % 10)
n //= 10
return sum(l)
def zad2(n):
return len(str(n))
print(zad1(5234))
print(zad2(5234))
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
def zad1(n):
l = []
while n > 1:
l.append(n % 10)
n //= 10
return sum(l)
def zad2(n):
return len(str(n))
print(zad1(5234))
print(zad2(5234))