<jupyter_start><jupyter_text>Calculating Mean,Std.Dev, Median, Mode of a given list  From statistica library in Pythonhttps://docs.python.org/3/library/statistics.html<jupyter_code>list1=[1,2,3,3,4,5,3,6,7,8,9,3,10]
list1
st.median(list1)
list1.sort()
list1
## Without using libray
##Mean
n=len(list1)
u=sum(list1)/n
print('Mean:',u)
##Standard Deviation
sm=0
for i in list1:
    sm=sm+(i-u)**2
    
std_dev=(sm/(n-1))**(0.5)
print('std_dev:',std_dev)

## Median
n=len(list1)
if n%2==0:
    a=(n-1)//2
    b=a+1
    median=(list1[a]+list1[b])*0.5
    print('Median:',median)
else:
    a=((n-1)+1)//2
    median=list1[a]
    print('Median:',median)
## Mode
list1=[1,3,4,5,6,3,3,1,2,2,2,6]
list2=list(set(list1))
count=[]
for i in list2:
    count.append(list1.count(i))
################################    
mode=[]  
maxm=max(count)
for i in range(len(count)):
    if count[i]==maxm:
        mode.append(list2[i])    
#mode    
count
list2
import statistics as st
list4=[1,3,4,5,6,3,3,1,2,2,6]
list4.remove(3)
list4
list4.pop(0)
list4
def fact_cal(n):
    fact=1
    while n>0:
        fact=fact*n
        n=n-1
    return(fact)
## finding value of e^x when x=1
sm=0
for i in range(101):
    sm=sm+(1/fact_cal(i))
print(sm)   
list1=[3,10,7,15,24,75]
for i in list1:
    if i%3==0 and i%5==0:
        print('FiZZBUZZ')
    elif i%3==0:
        print('FIZZ')
    elif i%5==0:
        print('BUZZ')
    else:
        print(i)<jupyter_output>FIZZ
BUZZ
7
FiZZBUZZ
FIZZ
FiZZBUZZ
{'fraction_non_alphanumeric': 0.21195652173913043, 'fraction_numerical': 0.07404891304347826, 'mean_word_length': 3.798045602605863, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '587339', 'license': 'MIT', 'n_tokens_mistral': 697, 'n_tokens_neox': 677, 'n_words': 120, 'path': 'Practice Problem_ Basic Python_1.ipynb', 'repo_name': 'AP-CS-104-Organization/python-101-divais', 'size': '1472'}