Xi Ai Final Practcial File
Xi Ai Final Practcial File
ARTIFICIAL INTELLIGENCE
PRACTICAL FILE
CLASS:XI
General Instructions:-
1. Run all the programming questions and take screen shot of coding and output in word file and
take the print of the same attach it in file. Screen shot must be clear and readable.
2. Practical File must contain front page , index and then start with your programs.
3. File must be properly formatted all the questions with coding and output must be clear.
4. Submit file on the day of Practical.
Q1 Write a python code to create a dataframe using dictionary:-
Item Company Rupees USD
TV LG 12000 700
TV VIDEOCON 10000 650
TV LG 15000 800
AC SONY 14000 750
Q2 Write a python code to create a dataframe using list and give header and index using column and index
attributes of dataframe.
Name Degree Score
S1 APARNA MBA 90.0
S2 PANKAJ BCA nan
S3 RAM M.TECH 80.0
S4 RAMESH MBA 98.0
S5 NAVEEN nan 97.0
S6 KRRISHNAV BCA 78.0
S7 BHAWNA MBA 89.0
Q3 Create the following DataFrame Sales containing year wise sales figure for five sales person in INR. Use
the years as column labels, and sales person name as row labels:
2014 2015 2016 2017
Madhu 100.5 12000 20000 50000
Kusum 150.8 18000 50000 60000
Kinshuk 200.9 22000 700000 70000
Ankit 30000 30000 100000 80000
Shruti 40000 45000 125000 90000
a. Create a dataframe
b. Display first 3 rows of the dataframe.
c. Display the details of Ankit.
d. Display the total number of rows and columns in the data frame.
e. Display the Sales of 2016.
Q4 Kavya’s AI marks for 5 consecutive tests is given below. Draw a line graph to Analyse her performance
Q5 Write a program to draw a line chart to visualize the comparative rainfall data for 12 months in Tamil
Nadu using the CSV file "rainfall.csv".
Q6 Create a bar graph to illustrate the distribution of students from various schools who attended a seminar
on “Deep Learning”. The total number of students from each school is provided below.
Q7 Write a program to draw a scatter chart to visualize the comparative rainfall data for 12 months in Tamil
Nadu using the CSV file "rainfall.csv".
Q8 Draw a Pie chart for the periods allotted for each subject in a week.\
Q9 The ages of a group of people in a community are: 25, 28, 30, 35, 40, 45, 50, 55, 60, 65. Write a program
to calculate the mean, median, and mode of the ages.
Q10 Plot a line chart representing the weekly number of customer inquiries received by a customer service
center:
• Week 1: 150 inquiries
• Week 2: 170 inquiries
• Week 3: 180 inquiries
• Week 4: 200 inquiries
Q11 Plot a bar chart representing the number of books sold by different genres in a bookstore:
• Fiction: 120 books
• Mystery: 90 books
• Science Fiction: 80 books
• Romance: 110 books
• Biography: 70 books
Q12 Visualize the distribution of different types of transportation used by commuters in a city using a pie
chart:
• Car: 40%
• Public Transit: 30%
• Walking: 20%
• Bicycle: 10%
Q13 Consider the following admission.csv and answer the following questions: