<jupyter_start><jupyter_text>Python Functions  Find the Max of three numbers<jupyter_code>def maxofthree(a,b,c):
    if a>b and a>c:
        print("A is greater",a)
    elif b>a and b>c:
        print("B is greater ",b)
    else:
        print("C is greater ",c)
        
maxofthree(2,3,5)<jupyter_output>C is greater  5<jupyter_text>Write a Python function to sum all the numbers in a list<jupyter_code>def sumall(*ar):
    suma = 0
    for i in ar:
        suma = i + suma
    print(suma)
sumall(12,3,4,5)<jupyter_output>24<jupyter_text>Write a Python function to multiply all the numbers in a list.<jupyter_code>def multiply(*number):
    mul = 1
    for i in number:
        mul = i * mul
    return mul
print(multiply(3,4,36,7))<jupyter_output>3024<jupyter_text>Write a Python program to reverse a string<jupyter_code>def string(e):
    str1 = ''
    index = len(e)
    while index>0:
        str1 += e[index-1]
        index =index - 1
    print(str1)
string("Ehtisham")<jupyter_output>mahsithE<jupyter_text>Calculate the factorial of a number<jupyter_code>def fact(n):
    if n==0:
        return 1
    else:
        return n* fact(n-1)
fact(5)<jupyter_output><empty_output><jupyter_text>Check whether a number is in a given range<jupyter_code>def number(n):
    if n in range(3,7):
        print("Yes number is in given range")
    else:
        print("No number is not in given range")
number(5)<jupyter_output>Yes number is in given range<jupyter_text>Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters<jupyter_code>def function(c):
    d = {"UPPER_CASE":0,"LOWER_CASE":0}
    for i in c:
        if i.isupper():
            d["UPPER_CASE"]+=1
   
        elif i.islower():
            d["LOWER_CASE"]+=1
        else:
            pass
    print("No of UPPER_CASE Letter",d["UPPER_CASE"])
    print("No of LOWER_CASE Letter",d["LOWER_CASE"])
function("Ehtisham")<jupyter_output>No of UPPER_CASE Letter 1
No of LOWER_CASE Letter 7<jupyter_text>Write a Python function that takes a list and returns a new list with unique elements of the first list.<jupyter_code>def unique_list(l):
    x = []
    for i in l:
        if i not in x:
            x.append(i)
    return x
print(unique_list([1,22,22,33,21,33,45]))<jupyter_output>[1, 22, 33, 21, 45]<jupyter_text>Write a Python function that takes a number as a parameter and check the number is prime or not.<jupyter_code>def prime(n):
    if n ==0 or n==1:
        return False
    
    for i in range(2,n):
        if n %2!=0:
            return True
        else:
            return False
prime(4)
prime(15)<jupyter_output><empty_output><jupyter_text>Print the even numbers from a given list<jupyter_code>def even(l):
    even = []
    for i in l:
        if i%2 ==0:
            even.append(i)
    return even
even([12,3,4,245,34])<jupyter_output><empty_output><jupyter_text>Generate and print a list where the values are square of numbers between two numbers<jupyter_code>def printvalues():
    l = list()
    for i in range(1,21):
        l.append(i**2)
    return l
printvalues()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10870258208479439, 'fraction_numerical': 0.027414727446605038, 'mean_word_length': 3.2234185733512786, 'pattern_counts': {'":': 2, '<': 38, '<?xml version=': 0, '>': 43, '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': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '369424', 'license': 'MIT', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1117, 'n_words': 323, 'path': '16.Lecture.ipynb', 'repo_name': 'Shahzeb-A/Python-Lectures-for-Beginners', 'size': '3137'}