Complete Practical File of Class XII-IP 2020-21

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 80

Practical file-प्रैक्टिकल फाइल

in
Informatics practices-065
for
Session 2020-21

Guided by: A. K. Pandey


(HOD Comp.Dept.) Submitted by: ___________

Roll.No-________________

l.b.s. school , sector-3 r k puram


Certificate
1
This is to certify that
__________________ , Roll No. _______ of
class _____ Session ____ has prepared the
Practical File as per the prescribed Practical
Syllabus of Informatics Practices Code-065,
Class-12 AISSCE (CBSE) under my supervision.
It is the original work done by him/her. His/ her
work is really appreciable.
I wish him/her a very bright success.
__________________
Signature of Teacher.

__________________
Signature of External

Index
2
S.No. Practical Description Page Teacher's
No. Sign.
Section-A (Data
Visualization)
1
2
3
4
..
..
Section-B (Python Pandas)
..
..
..
..
..
..
Section-C (SQL Commands)
..
..
..

3
Section-A

DATA VISUALIZATION

4
PRACTICAL NO-1

•Problem Definition : Write a


python program to generate line
graph with suitable title and
labels. Where x is the year of
performance with values 2014,
2015, 2016, 2017,2018 and
2019. And y axis shows the
profit of a particular company in
Rs.(Millions).
CODING:

5
OUTPUT:

6
PRACTICAL NO-2

7
Problem Definition : Given the
following data of rainfall in
different zones of India in mm for
12 months.
Create multiple line charts in a
Figure to observe any trends from
Jan to Dec.
CODING:

8
OUTPUT:

9
PRACTICAL NO-3

Problem Definition : Consider


the data given below in the
table, Create a bar chart
depicting the downloads of the
app.

CODING:

10
OUTPUT:

11
PRACTICAL NO-4

Problem Definition : Given the


following data of rainfall in North
& South zones of India in mm for
12 months.
Create multiple Bar charts in a
Figure to compare rail fall of
North and South zone from Jan to
Dec.
12
CODING:

OUTPUT:

13
PRACTICAL NO-5

14
•Problem Definition : Given the
ages of 50 participants in some
game. Write a program to plot
a histogram from given data
with 10 bins.
Data =
[ 10,11,13,13,15,16,17,18,19,21,23,23,23,2
4,24,25,25,25,25,25,26,26,27,27,27, 27,
29,30,30,30,30,31,33,34,34,35,36,36,37,37,
37, 38,39,40,40,40,41,42,43,43]

Also plot a cumulative frequency


histogram.
CODING:

15
OR

OUTPUT:

16
1

PRACTICAL NO-6

17
•Problem Definition : Given
below are the sugar levels for
men and women in a city.
Compare the sugar levels
amongst them.
men =
[113,85,90,150,149,88,93,115,135,80,77,8
2,129]
women=[67,98,89,120,133,150,84,69,89,79,
120,112,100]
CODING:

18
OR

OUTPUT:

19
1

20
Section-B

PYTHON PANDAS

PRACTICAL NO-7

21
•Problem Definition : Create a
Series from a Dictionary and
another series using n-d array.
( Create the dictionary with
month name as key and no. of
days as value and create a 1-d
array of n integers.)
CODING:

22
OUTPUT:

23
PRACTICAL NO-8
Problem Definition : Create two Series, one from array and
another from List object, one with default index and another with
user defined index, one int data dtype and another string data type.
Now print the following attributes in the given format.
Attribute Name Series1 Series2
Data type :
Shape :
No. of bytes
No. of Dimensions
Has NaNs ?
Empty?
Index
values

CODING:

24
OUTPUT:

25
26
PRACTICAL NO-9

•Problem Definition : Write a


python code to create a Series object
Temp1 that stores temperature of seven
days in it, Take any random 7 values of
temperatures and print this Series. Now
define indexes as 'Sunday',
'Monday'.......... Up to 'Saturday' and
print the Series again. Now print all
attributes of the series as well as
average temperature of 7 days.

CODING:

27
OUTPUT:

28
PRACTICAL NO-10
29
Problem Definition : Define two
series named Population Storing the
population of 4 metro cities of India and
AvgIncome stores the total average
income reported in previous year in each
of these 4 cities. Calculate income per
capita for each of these metro cities.
Print it in the following tabular form.
(Take real data from the net)
CODING:

30
OUTPUT:

31
PRACTICAL NO-11

32
Problem Definition : Create a
Series that stores the area of all
states of India in km2. Create this
series through user's input. Now
find out the biggest and the
smallest area of 3 states. Also
find out the area and states
having area more than 5000 km . 2
CODING:

33
INPUT:

34
35
OUTPUT:

36
37
PRACTICAL NO-12
PROBLEM DEFINITION:

“Create a Series from an array of 25


random numbers between 10 to 60. Print
the series. Now print as per the following
queries:
a) Print 75 percentile of this series.
b) Print all values above 75 percentile.

CODING:

38
OUTPUT:

39
40
41
PRACTICAL NO-13
PROBLEM DEFINITION:

Three Series objects store the marks of


10 students in three terms. Roll number
of students form the index of these
series objects. The three Series objects
have the same indices.
Calculate the total weighted marks
obtained by students as per following
formula.
CODING:

42
INPUT:

43
OUTPUT:

44
PRACTICAL NO-14
PROBLEM DEFINITION:

Write a Program to store the sales of 5 fast moving items


of a store for each month in 12 Series objects, i.e. S_Jan
Series object store sale of these 5 items in January month,
S_Feb Series object store sale of these 5 items in February
month, and so on.
The program should display the summary sales report like
this-
a) Total yearly sales, item-wise: ( should display sum of
items' sales over the months)

CODING:

45
46
OUTPUT:

47
48
PRACTICAL NO-15
PROBLEM DEFINITION:
Write a Python program to create a
DataFrame as given below, and display all
its attributes ( index, columns, shape,
size, axes, rows and columns.

CODING:

49
OUTPUT:

50
PRACTICAL NO-16
PROBLEM DEFINITION:

Write a Python Program to Create a


Data Frame Cricketdf with columns
Playername, age, TotalScore,
Century, and Fifties for ten Players.
(Add player_id from 101 to 110 in
the dataframe during creation)
a) Now using head() and tail() function,
CODING:

51
OUTPUT:

52
53
54
Write a Python Program to create the following
DataFrame namely aid_df that stores the aid by
PRACTICAL
NGOs for different states. NO-17
PROBLEM
Now DEFINITION
display the following:
a) Show the data of toy column
b) Show the data of Books and Uniform columns
c) Show the data of Toys and Uniform Column for
top 3 rows ( Use loc)
d) Show the data of first 3 rows and first 3
columns( using iloc)
e) Now set the state as index and display the
dataframe
f) Now show the data for Toys, Uniform and Shoes
columns of Andhra ,bihar and W.B
e) Now reset the index and show the dataframe

CODING:

55
OUTPUT:

56
57
Create the following Data Frame
PRACTICAL NO-18
showing
PROBLEM quarterly
DEFINITION : sale year-wise, now
write python code as per the given
questions.
a) Display the data frame .
b) Now write a menu driven program to extract data
from dataframe a) Row-wise b) Row-wise Series
object ( Using iterRows() function).
c) Similarly Perform iteration column wise also. ( Use
iteritems() functions, make menu driven)
The output should appear as under:

CODING :

58
OUTPUT:

59
60
61
PRACTICAL NO-19
PROBLEM DEFINITION :

Write a Python Program


to create two
dataframes and
CODING:

62
OUTPUT:

63
64
65
Create a data PRACTICAL
frame as per given row and
NO-20
columns
PROBLEM in it. Display
DEFINITION : it. Now perform the
following by writing python code.
a) Add a column Total showing sum of marks of all subjects.
b) Now increase 5 marks in the 'Total' column for all
students.
c) Add one more column Percentage, calculated on the
basis of 'Total' marks obtained out of 500.
d) Add a new row in the above DataFrame.( Using loc)
e) Add two more rows together in the above dataFrame.
( Using append)
f) Now modify the English marks of Thomas as 70,
accordingly update his Total and percentage.
g) Now display the DataFrame.

CODING :

66
OUTPUT:

67
68
PRACTICAL NO-21
PROBLEM DEFINITION :

Consider the data frame as created below:


import pandas as pd
dict1={'empcode':['E101','E102','E102','E103','E104'],
'Ename':['Sam','Kain','Scott','Joy','Tom'],
'Job':['Clerk','Manager','Clerk','Analyst','Manager'],
'Salary':[20000,50000,18000,55000,65000],
'bonus':[1000,2500,1000,7000,5000],
'Zone':['West','East','East','North','West‘]}
CODING:

69
OUTPUT:

70
71
Section-C

MySQL- SQL Commands

72
SQL Commands
Q.1- Create a database 'School' on the database server, show the list of databases and open
it.

Q 2- Create the following table named 'STUDENT' with appropriate data type, size and
constraint(s) if any.

73
Q.3- insert the following records into the table.

Q.4- Display all the information of males whose city is NEITHER Delhi or Mumbai.

Q.5- Display the details of all the students whose date of birth is after Nishant’s Birth date 1995-12-
06. (consider the Sql’s standard date format)

74
Q.6- Display all information about class XII students rank wise.

Q.7- Display all columns arranged in descending order of city and within the city in the ascending
order their marks.

Q.8- List names of all students whose name has the character ‘a’.

75
Q.9- Display Name and Marks of those students whose marks is in the range 400 and 500 ( both are
inclusive)

Q.10- Display average marks, highest marks and total no. of students for each class

Q.11- Display total no of males and females separately, along with their average marks.

Q.12- Increase the marks of 10th class students by 5% marks.

76
Q.13- Add a new column named Address. ( Take the data type and size yourself)

Q.14- Add Primary key to the column Name.

Q.15- Display name, class and city of 'XII' class students who lives in 'Mumbai'.

77
Q.16- Display unique sex names.

Q.17- Display name, data of birth and day name (like Sunday, Monday,.), of all females, whose
marks is greater than or equal to 400.

Q.18- Display City and highest marks of students of each city, but only for Delhi and Mumbai.

78
Q.19- Display round of average marks up to zero places, truncate of average marks up to 1 decimal
place for class 'X' students only.

Q.20- Write a query to display name and the position of character 'a' in the names of students
having 'a' anywhere in their names.

Q.21- Display name, character number 3rd and 4th of each name and counting of number of
characters in each name.

79
Q.22- Display current date and current time together.

Q.23- Display name, marks and round up the Square root of marks up to 2 decimal places

Teacher's Signature:

_____________________

80

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy