0% found this document useful (0 votes)
31 views13 pages

Informatics Practices Practical File 2025-26

This document is a practical file for the subject of Informatics Practices for the academic year 2025-26. It includes various tasks related to data handling using Pandas, data visualization, and database queries using MySQL, along with a certificate section for student and teacher signatures. The document outlines specific programming exercises and SQL queries to be performed by students.

Uploaded by

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

Informatics Practices Practical File 2025-26

This document is a practical file for the subject of Informatics Practices for the academic year 2025-26. It includes various tasks related to data handling using Pandas, data visualization, and database queries using MySQL, along with a certificate section for student and teacher signatures. The document outlines specific programming exercises and SQL queries to be performed by students.

Uploaded by

nidhimishra1178
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NAME:

ROLL NO.:

CLASS:

SUBJECT: Informatics Practices

ACADEMIC YEAR: 2025-26

TOPIC: Practical File


AGARWAL VIDYA VIHAR, SURAT

CERTIFICATE
The programs entered in this file have been satisfactorily
performed by

Master / Miss _________________________________________


studying in ____________________________________________
___________________________________________________school
Class ____________ Div. _____________ Roll No. ___________
during the academic year _____________________________

_______________ _______________
Teacher’s signature Principal ‘s signature

________________
School Stamp
INDEX
Part -1 Data Handling using Pandas
1. Create Pandas Series using given list and give index as years from 2016 to 2023.
sales= [12500,45360,74120,84500,85000,45600,37500,51200]
2. Create Pandas Series using ndarray. Use the given list to create an array. [12,23,34,45,56]
3. Write commands for the following:
a) Create Series EngAlph, which contains A to Z letters.
b) Find the dimensions, size and values of the Series EngAlph.
c) Display the alphabets ‘e’ to ‘p’ from the Series EngAlph.
d) Display the first 10 values in the Series EngAlph.
e) Display the last 10 values in the Series EngAlph.
4. Create the series object S_amount using following data and perform following commands for (a) to (c) :

TV unit 15000
Chair 1200
Sofa 25000
Table 8000

(a) Write the command that will display the name of the furniture having price >18000.
(b) Write the command to name the series as Furniture.
(c) Write the command to increase the price of all items by 500.
5. Write a program to create a series object using dictionary, having 3 movie names as data with index labels
2023, 2024 and 2025.
6. Write a Python code to create a data frame with appropriate headings from the list given below:
[‘11CA01’, ‘Anu’, 70]
[‘11CA02’, ‘Brij’, 80]
[‘11CA03’, ‘Charu’, 78]
7. Write a program to create a data frame player using a list of names and scores of the previous three
matches.
Player’s Names Match1 Match2 Match3
0 Rohit Singh 95 80 102
1 Virat Kohli 85 89 56
2 Shubhman Gill 89 77 74

8. Write a program to create a data frame salesman using the series ‘sales_person’ which stored salesman
names and quantity of sales of previous month.
9. Write a program to create a data frame country using a dictionary which stored country name, capitals and
populations of the country.
10. Consider Data Frame Info as shown below:
runsscore
name age weight height d
0 mayur 15 51 5.1 55
1 anil 16 48 5.2 25
2 viraj 17 49 5.1 71
3 viraj 17 51 5.3 53
mahes
4 h 16 48 5.1 51
5 viraj 17 59 5.3 50

a) Write command to calculate minimum value for each of the row from subset of dataframe
that contains age, weight, height, runsscored
b) Write command to calculate mean for last 3 rows.
11. Write the values of dataframe Info(created in Que-10) to a comma separated file [Link] on the disk. Do
not write the row labels and column labels. Read the data from the file [Link] into a dataframe
studinfo and display it.
12. Write a python program for the following situation:

ABC Enterprises is selling its products through three salesmen and keeping the records of sales done
quarterly of each salesman as shown below:

Quarter 1 Quarter 2 Quarter 3 Quarter 4


Salesman 1 23000 18000 30000 35000
Salesman 2 11000 15000 20000 22000
Salesman 3 60000 40000 35000 55000

Company is storing the above information using dataframe object ,so create datframe for the above
given data and after analysis the data is stored in CSV file “Qtrly_Sales.csv” for further use so store
the same data in csv file.

Part -2 Data Visualization


1. Write code to Plot the following data on line chart:
Runs in Overs 10 20

MI 110 224

RCB 85 210

 Write a title for the chart "RUNS PER OVER".


 Write the appropriate titles of both the axes.
 Write code to Display legends.
 Display red color for the line for MI.
 Use the line style – dashed for RCB.
 Display diamond style markers on both data points
2. Plot following data on bar graph and customize the graph as you wish:
English: 56,78,90,34
Science: 65,77,54,32
Maths: 45,67,43,41
3. Use above marks data and subplot Science and Maths marks.
4. Consider a Dataframe Mkdf as shown below
name age PB Board
0 Karan 17 4 25
1 Amit 19 24 94
2 Ani 18 31 89
3 Pankaj 17 8 67
write a program to plot multiple bar chart for preboard marks and board marks from above dataframe.
5. Given the following set of data:

Weight measurements for 16 small orders of French-fries (in grams).


78 72 69 81 63 67 65 75
79 74 71 83 71 79 80 69
Create a simple histogram from the above data.
6. Generate random numbers from 1 to 70 and plot it on the histogram. Change the outline color to black
and the bar color should be yellow. Display the above data in cumulative mode on histogram.
Part – 3 Database Query using MySQL
1. Create the following table named "Charity" and write SQL queries for the tasks
that follow:
Table: Charity
1 Bindra Jaspreet 5B, Gomti Nagar Lucknow 3500.50
2 Rana Monica 21 A, Bandra Mumbai 2768.00
3 Singh Jatinder 8, Punjabi Bagh Delhi 2000.50
4 Arora Satinder K/1, Shere Punjab Colony Mumbai 1900.00
5 Krishnan Vineeta A-75,Adarsh Nagar
(Contribution is in Rs.)
I. Display all first names in lowercase
II. Display all last names of people of Mumbai city in uppercase
III. Display Person Id along with First 3 characters of his/her name.
IV. Display first name concatenated with last name for all the employees.
V. Display length of address along with Person Id
VI. Display last 2 characters of City and Person ID.
VII. Display Last Names and First names of people who have "at" in the second or third position in their
first names.
VIII. Display the position of 'a' in Last name in every row.
IX. Display Last Name and First name of people who have "a" as the last character in their First names.
X. Display the first name and last name concatenated after removing the leading and trailing blanks.
XI. Display Person Id, last names and contribution rounded to the nearest rupee of all the persons.
XII. Display Person Id, last name and contribution with decimal digits truncated of all the persons.
XIII. Display Last name, contribution and a third column which has contribution divided by 10. Round it to
two decimal points.
2. Consider the table "Grocer" and write SQL queries for the tasks that follow:
Table: Grocer
1 Rice 52.50 80 2010-02-01
2 Wheat 25.40 50 2010-03-09
3 Corn 50.80 100 2010-03-11
4 Semolina 28.90 50 2010-01-15
(Unit Price is per kg price)
I. Display Item name, unit price along with Date of purchase for all the Items.
II. Display Item name along with Month (in number) when it was purchased for all the items.
III. Display Item name along with year in which it was purchased for all the items.
IV. Display Item Id, Date of Purchase and day name of week (e.g. Monday) on which it was purchased for
all the items.
V. Display names of all the items that were purchased on Mondays or Tuesdays.
VI. Display the day name of the week on which Rice was purchased.
VII. Display the Item name and unit price truncated to integer value (no decimal digits)of all the items.
VIII. Display current date
3. Write SQL commands for the following queries (i) to (v) based on the relations given below:Table :
BOOKS

Bookid Bookname Authorname Publishers Price Type Qty


F0001 The Tears William Hopkins First publ. 750 Fiction 10
F0002 Thunderbolts Anna Roberts First publ. 700 Fiction 5
T0001 Myfirst C++ Brain and Brooke EPB 250 Text 10
T0002 C++ Brainworks A.W. Rossanie TDH 325 Text 5
C0001 Fast Cook Lata Kapoor EPB 350 Cookery 8

Table : ISSUED
Bookid Qty_issued
F0001 3
T0001 1
C0001 5
i. To show Bookname , Authorname and price of books of EPB publishers.
ii. To display the names and price of the books in descending order of their price.
iii. To display increase the price of all books of First Publishers by 50.
iv. To display the Bookid , Bookname and Qty_issued for all books which have been issued.
v. To insert a new record in the ISSUED table with the following data:
“F0002” , 4.
Part -1 Data Handling using Pandas
Practical -1: -
Code:

Output:

Practical -2: -
Code:

Output:
Practical -3: -
Code:

Output:

(b)
(c) (d) (e)

Practical -4: -
Code:

Output:

(a)
(b)

(c)

Practical -5: -
Code:

Output:

Practical -6: -
Code:
Output:

Practical -7: -
Code:

Output:
Practical -8: -
Code:

Output:

Practical -9: -
Code:

Output:

Practical -10: -
Code:

Output:

You might also like