0% found this document useful (0 votes)
7 views2 pages

AI ML Exp 1-1

fff

Uploaded by

Akshaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

AI ML Exp 1-1

fff

Uploaded by

Akshaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Exp no.

Questions
1 Familiarisation of Basic Python Libraries
Numpy
Create two 1d arrays and perform the following array operations using ‘numpy’.
• Element-wise addition
• Element-wise subtraction
(a) • Element-wise multiplication
• Element-wise division
• Element-wise exponentiation
Array Indexing
Write a Python program to create an array of 5 integers and display the array items. Find the
(b) sum of 1st element, middle element and last element by accessing the elements through
indexes.
Write a Python program to find the pair of elements with the maximum remainder from a
(c)
given array of integers.
Create a 2d array and find the product of element on the first row, second column and
(d)
element on third row, first column.
(e) Create a 2d array and print the second last element from the last row.
PANDAS
Create a dictionary with the following data for 10 persons and store it as csv file.
(f)
Explicitly create the index also.

Download the diabetes dataset https://www.kaggle.com/datasets/mathchi/ diabetes-data-set.


(g)
Generate the descriptive statistics for the same. Use only basic python functions.
MATPLOTLIB
Write a Python programming to display a bar chart (horizontal and vertical) of the
(h) district-wise population in Kerala for the year 2023. Use different color for each bar. Attach a
text label above each bar displaying its population.
Write Python programming to create a pie chart with a title of the popularity of
(i)
programming Languages.
Write a Python program to create a scatter plot with population and area of all
(j)
districts in Kerala for the year 2023.
Scikit-learn
Download the ‘Advertising dataset’ from the link https://www.kaggle.com/
datasets/ashydv/advertising-dataset. Use sklearn library to implement
(k)
linear regression for analyzing the relationship between ‘Radio advertising’ and
‘sales’.

You might also like