<jupyter_start><jupyter_text><jupyter_code>def num_reverse(num):
    reverse = 0
    while num > 0:
        remainder = num%10
        reverse = reverse*10 + remainder
        num = num//10
    return reverse
num_reverse(123)
num_reverse(1020304)
def sum_digits(n):
    summ=0
    while n>0:
        rem=n%10
        summ=summ+rem
        n=n//10
    return summ
sum_digits(234)
sum_digits(100002)
sum_digits(00000)
import math
def prime(n):
    if n == 0 or n == 1:
        return False
    else:
        for i in range(2, int(n**0.5)+1):
            if n%i == 0:
                return False
                break
        else:
            return True
            
def sum_prime(ls):
    sum_of_primes=0
    for i in ls:
        if prime(i):
            print(i)
            sum_of_primes += i
    return sum_of_primes
sum_prime([0,1,2,3,4,5,10,11])
def increasing(ls):
    for i in range(1,len(ls)):
        if ls[i] < ls[i-1]:
            return False
    return True
increasing([0,-1,2,3,4,5,7])
def expanding_list(lst):
    dif=0
    n=len(lst)
    for i in range(1,n):
        x=abs(lst[i-1]-lst[i])
        if x>=dif:
            dif=x
        else:
            return False
    return True
print(expanding_list([1,2,1,4,5,6,9,12,15,18,23,34]))
def expanding(l):
    d1 = abs(l[1] - l[0])
    d2 = abs(l[2] - l[1])
    
    if d1 >= d2:
        return False
    
    else:
        for i in range(3,len(l)):
            d3 = abs(l[i] - l[i-1])
            if d3 <= d2:
                return False
            d2 = d3
        else:
            return True
expanding([1,3,7,2,9])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1325077399380805, 'fraction_numerical': 0.06501547987616099, 'mean_word_length': 1.7251264755480606, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '609663', 'license': 'Apache-2.0', 'n_tokens_mistral': 660, 'n_tokens_neox': 620, 'n_words': 137, 'path': 'Session_10_(_Questions_).ipynb', 'repo_name': 'madhavjk/CP-Python', 'size': '1615'}