<jupyter_start><jupyter_text>1. Write a Python Program to find sum of array?<jupyter_code>import numpy as np
n=int(input("Enter the range: "))
ls=[]
for i in range(n):
    ls.append(int(input("Enter the number: ")))
array = np.array(ls)
print("The Entered array is:", array)
sum=0
for i in array:
    sum=sum+i
print("Sum of array is: ",sum)<jupyter_output>Enter the range: 5
Enter the number: 1
Enter the number: 2
Enter the number: 3
Enter the number: 4
Enter the number: 5
The Entered array is: [1 2 3 4 5]
Sum of array is:  15<jupyter_text>2. Write a Python Program to find largest element in an array?<jupyter_code>import numpy as np
n=int(input("Enter the range: "))
ls=[]
for i in range(n):
    ls.append(int(input("Enter the number: ")))
array = np.array(ls)
print("The Entered array is:", array)
lar=0
for i in array:
    if(lar<i):
        lar=i
print("The largest element in array is ", lar)<jupyter_output>Enter the range: 5
Enter the number: 45
Enter the number: 75
Enter the number: 89
Enter the number: 99
Enter the number: 5
The Entered array is: [45 75 89 99  5]
The largest element in array is  99<jupyter_text>3. Write a Python Program for array rotation?<jupyter_code>def LeftRotation(ar,n):
    l=len(ar)
    return(np.array(ar[l-n:]+ar[:l-n]))
import numpy as np
n=int(input("Enter the range: "))
ls=[]
for i in range(n):
    ls.append(int(input("Enter the number: ")))
array = np.array(ls)
print("The Entered array is:", array)
x=int(input("Enter the number of rotation you need: "))
print("Array after Left Rotation is ",LeftRotation(ls,x))<jupyter_output>Enter the range: 5
Enter the number: 1
Enter the number: 2
Enter the number: 3
Enter the number: 4
Enter the number: 5
The Entered array is: [1 2 3 4 5]
Enter the number of rotation you need: 4
Array after Left Rotation is  [2 3 4 5 1]<jupyter_text>4. Write a Python Program to Split the array and add the first part to the end<jupyter_code>def ArraySplit(ar):
    l=len(ar)
    if(l%2==0):
        mid=int(l/2)
    else:
        mid=int((l/2)+1)
    return(np.array(ar[l-mid:]+ar[:l-mid]))
import numpy as np
n=int(input("Enter the range: "))
ls=[]
for i in range(n):
    ls.append(int(input("Enter the number: ")))
array = np.array(ls)
print("The Entered array is:", array)
print("Array after Left Rotation is ",ArraySplit(ls))<jupyter_output>Enter the range: 6
Enter the number: 1
Enter the number: 2
Enter the number: 3
Enter the number: 4
Enter the number: 5
Enter the number: 6
The Entered array is: [1 2 3 4 5 6]
Array after Left Rotation is  [4 5 6 1 2 3]<jupyter_text>5. Write a Python Program to check if given array is Monotonic?<jupyter_code>def IsMonotonic(ls):
    return (all(ls[i]<=ls[i+1] for i in range(len(ls)-1)) or
            all(ls[i]>=ls[i+1] for i in range(len(ls)-1)))
import numpy as np
n=int(input("Enter the range: "))
ls=[]
for i in range(n):
    ls.append(int(input("Enter the number: ")))
array = np.array(ls)
print("The Entered array is:", array)
res=IsMonotonic(ls)
if(res==True):
     print("The Entered array is Monotonic")
else:
    print("The Entered array is Not Monotonic")<jupyter_output>Enter the range: 5
Enter the number: 5
Enter the number: 10
Enter the number: 25
Enter the number: 20
Enter the number: 1
The Entered array is: [ 5 10 25 20  1]
The Entered array is Not Monotonic
{'fraction_non_alphanumeric': 0.12621065375302665, 'fraction_numerical': 0.031174334140435835, 'mean_word_length': 4.4537953795379535, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 17, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '58106', 'license': 'Apache-2.0', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1173, 'n_words': 456, 'path': 'Python Basic Assignment -7.ipynb', 'repo_name': 'MuhammedAbin/iNeuron-Assignment', 'size': '3304'}