Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
461 B
2
Indexable
Never
# 1
def cyfry(n):
    list = []
    while n>0:
        reszta =n%10
        list.append(reszta)
        n = n//10
    return list[::-1]
print(cyfry(123))
# 2
def dodac(n):
    s= 0
    while n>0:
        reszta = n%10
        s+=reszta
        n = n//10
    return s
print(dodac(54))
# 3
def dwucyfrowa():
    n=input(("napisz liczbe: "))
    if n == n[::-1]:
        return True
    else:
        return False
print(dwucyfrowa())
# 4
def piec(n):
    list = []
Leave a Comment