Term-I Practical Question Paper 2022-2023

You might also like

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

Vikas Bharati Public School

Practical Examination Session(2022-2023)


Subject: Informatics Practices practical(065) SET A
Time: 3 Hr M.M : 30
Q1. Write a program in Python to create a DataFrame df from the following dictionary 4
record = { 'Name': ['Ankit', 'Amit', 'Aishwarya', 'Priyanka', 'Priya', 'Shaurya' ],
'Age': [21, 19, 20, 18, 17, 21],
'Stream': ['Math', 'Commerce', 'Science', 'Math', 'Math', 'Science'],
'Percentage': [88, 92, 95, 70, 65, 78]}
Also write python statements to perform the following:
(a) Select all the rows from the dataframe in which ‘Percentage’ is greater than 80.
(b) Display the 2nd and 3rd row
(c) Display the Names whose age is between 19 and 21.
Q2 Write a program in Python to plot a Bar plot from the following data. 4
MONTH JANUARY FEBRUARY MARCH APRIL MAY
SALES 40000 35000 12000 56000 60000

The bar chart should have the following features:


i) The Title should be ‘Sales Report’
ii) The X axis label should be Month Names
iii) The Y axis label should be Monthly Sales
iv) The bars should have different colours

Q3. Create a database HR and create a table Employee in MySQL. The structure of the 7
table is
Field names Datatype &Size Key
Empno Int(11) Primary key
Ename Varchar(30)
Address Varchar(50)
Phno Varchar(10)
Basic Decimal(8,2)
Write SQL queries for (a)-(b) and output for (c) and (d):
(a) Display the details of all employees whose names end with ‘t’
(b) Display the details of all employees whose Basic salary is in the range 30,000 and
50,000
(c) SELECT ROUND(231456.982,2);
(d) SELECT MID(“INFORMATION”,3,4);
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET B
Time: 3 Hr M.M : 30

Q1. Create a series EngAlph, having 26 elements with the alphabets as values and default index 4
values. Write Python statements to perform following:
(a) Find the dimensions, size and values of the Series EngAlph
(b) Display the alphabets ‘e’ to ‘p’ from the Series EngAlph
(c) Display the Series EngAlph in reverse order
Q2. Write a program in Python to plot a Bar plot from the following data. 4
COUNTRY INDIA AUSTRALIA ENGLAND JAPAN USA
MEDALS 260 200 310 340 325

The bar chart should have the following features:


i) The Title should be ‘Medal Tally’
ii) The X axis label should be Country Names
iii) The Y axis label should be Medals won
iv) The bars should have different colours

Q3. Create a database HR and create a table Employee in MySQL. The structure of the 7
table is
Field names Datatype &Size Key
Empno Int(11) Primary key
Ename Varchar(30)
Dept Varchar(50)
Phno Varchar(10)
Basic Decimal(8,2)
Write SQL queries for (a)-(b) and output for (c)-(d) the following:
(a) Display the details of all employees whose names starts with ‘S’
(b) Display the details of all employees whose Basic salary is more than 30,000.
(c) SELECT ROUND(34672.985,-1);
(d) SELECT MID(“UNIVERSAL”,3,3);
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET C
Time: 3 Hr M.M : 30

Q1. Consider the following Python dictionary data and Python list labels: 4
data = {‘animal’: [‘cat’, ‘cat’, ‘snake’, ‘dog’, ‘dog’, ‘cat’, ‘snake’, ‘cat’, ‘dog’, ‘dog’],
‘age’: [2.5, 3, 0.5, np.nan, 5, 2, 4.5, np.nan, 7, 3],
‘visits’: [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
‘priority’: [‘yes’, ‘yes’, ‘no’, ‘yes’, ‘no’, ‘no’, ‘no’, ‘yes’, ‘no’, ‘no’]}
labels = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘I’, ‘j’]
Create a DataFrame df from this dictionary data which has the index labels.
(a) Display the first 3 rows of the DataFrame df
(b) Select just the ‘animal’ and ‘age’ columns from the DataFrame df
(c) Select only the rows where the number of visits is greater than 2.
Q2. Write a program in Python to plot a Bar Graph from the following data 4

SEC XII-A XII-B XII-C XII-D XII-E


AVERAGE MARKS 75 84 69 73 81
The bar chart should have the following features:
i) The Title should be ‘Class XII Result’
ii) The X axis label should be Class and Sec
iii) The Y axis label should be Average Marks
iv) The bars should have different colours

Q3. Consider the following table Club 7

Write Sql queries for (a)-(c) and output for (d)-(e)


(a) Count the total number of members in each city
(b) Display the records where Fees is more than 1500
(c) Display the records in descending order of age
(d) SELECT MAX(Fees) FROM Club;
(e) SELECT COUNT(DISTINCT ADDRESS) FROM Club;
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET D
Time: 3 Hr M.M : 30

Q1. Create the following DataFrame Sales containing year wise sales figures for five sales persons 4
in INR. Use the years as column labels, and sales person names as row labels.

(a) Display the last two rows of Sales.


(b) Display the sales made by all sales persons in the year 2017.
(c) Add data to Sales for salesman Sumeet where the sales made are
[196.2, 37800, 52000, 78438] in the years [2014, 2015, 2016, 2017] respectively.
Q2. Write a python program to create a bar chart with the following information: 4
Country Population
China 150
India 140
USA 55
Russia 40
England 60
The bar chart should have the following features:
i) The Title should be ‘World Population Stats’
ii) The X axis label should be Countries
iii) The Y axis label should be Population
iv) The bars should have the colour Red

Q3. Consider the table Flight and write SQL queries for the (a)-(c) and output for (d) -(e)following: 7

(a) Display the total number of Flights starting from Delhi


(b) Display the Flcode and Destination columns
(c) Display the maximum number of Flights
(d) SELECT ROUND(34567.865,2);
(e) SELECT COUNT(DISTINCT START) from FLIGHT;
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices Practical(065) SET E
Time: 3 Hr M.M : 30

Q1. Write a program in Python to plot a Bar Graph from the following data 4

SEC XII-A XII-B XII-C XII-D XII-E


AVERAGE MARKS 75 84 69 73 81
The bar chart should have the following features:
i) The Title should be ‘Class XII Result’
ii) The X axis label should be Class and Sec
iii) The Y axis label should be Average Marks
iv) The bars should have different colours

Q2. Write a program in Python to create a DataFrame df from the following dictionary 4
record = { ‘Name’: [‘Ankit’, ‘Amit’, ‘Aishwarya’, ‘Priyanka’, ‘Priya’, ‘Shaurya’ ],
‘Age’: [21, 19, 20, 18, 17, 21],
‘Stream’: [‘Math’, ‘Commerce’, ‘Science’, ‘Math’, ‘Math’, ‘Science’],
‘Percentage’: [88, 92, 95, 70, 65, 78]}
Also write python statements to perform the following:
(a) Display the 2nd and 3rd row
(b) Display the age of Priyanka
Q3. Create a database HR and create a table Employee in MySQL. The structure of the table is 7
Field names Datatype &Size Key
Empno Int(11) Primary key
Ename Varchar(30)
Dept Varchar(10)
Sal Int(10)
Write SQL queries for (a)-(b) and output for (c)-(d) the following.
(a) Display total number of employees in each department.
(b) Assume the Sal is monthly salary display the annual salary of all employees
(c) SELECT ROUND(4567832.985,2);
(d) SELECT MID(“INNOVATION”,5,3);
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET F
Time: 3 Hr M.M : 30

Q1. Create a series EngAlph, having 26 elements with the alphabets as values and default index 4
values. Write Python statements to perform following:
(a) Display the last 10 values in the Series EngAlph.
(b) Display the alphabets ‘e’ to ‘p’ from the Series EngAlph
Q2. Write Python code to plot a line chart to depict the run rate of T20 match from given data: 4
Overs Runs
5 45
10 79
15 145
20 234
The line chart should have the following features:
i) The Title should be ‘T20 Scrore’
ii) The X axis label should be Overs
iii) The Y axis label should be Runs
iv) The linestyle of the plot should be dashed

Q3. Create a table Library in MySQL. The structure of the table is 7


Field names Datatype &Size Key
Bookid Int(11) Primary key
Book_Name Varchar(30)
Author Varchar(50)
Price Decimal(6,2)
Write SQL queries for (a)-(b) and output for (c)-(d) the following:
(a) Display the details of all books whose price is more than 500.
(b) Display the details in ascending order of Author
(c) SELECT ROUND(45632.875,-2);
(d) SELECT MID(“MANIPULATION”,8,4);
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET G
Class XII
Time: 3 Hr M.M : 30

Q1. Write a python program to create a bar chart with the following information: 4
Country Population
China 150
India 140
USA 55
Russia 40
England 60
The bar chart should have the following features:
v) The Title should be ‘World Population Stats’
vi) The X axis label should be Countries
vii) The Y axis label should be Population
viii) The bars should have the colour Red

Q2. Create a series from the given list of number and perform the following operations 4
Numbers =[12,45,67,45,78,89,90,56,90,56,67,34,76,90,67,45,24]
(a) Give and increment of 10 to each element of this series
(b) Display all the elements of the series in reverse order
Q3. Create a table Student in MySQL. The structure of the table is 7
Field names Datatype &Size Key
Admno Int(11) Primary key
Name Varchar(30)
Class Varchar(50)
Marks Int(3)
Dob Date
Write SQL queries for (a)-(b) and output for (c)-(d):
(a) Display the number of students in each class
(b) Display all records in descending order of names
(c) SELECT ROUND(2356432.683,1);
(d) SELECT MID(“HAPPY”,2,4);
Q4. Report File 5
Q5. Project File 5
Q6. Viva 5
Vikas Bharati Public School
Practical Examination Session(2022-2023)
Subject: Informatics Practices practical(065) SET H
Class XII
Time: 3 Hr M.M : 30

Q1. Create a series from the given list of number and perform the following operations 4
Numbers =[12,45,67,45,78,89,90,56,90,56,67,34,76,90,67,45,24]
(a) Print all the elements that are above the 65
(b) Display all the element which is divisible by 3
Q2. Write Python code to plot a line chart to depict the run rate of T20 match from given data: 4
Overs Runs
5 45
10 79
15 145
20 234
The line chart should have the following features:
i) The Title should be ‘T20 Scrore’
ii) The X axis label should be Overs
iii) The Y axis label should be Runs
iv) The linestyle of the plot should be dashed

Q2. Create a table Product in MySQL. The structure of the table is 7


Field names Datatype &Size Key
Prodid Int(11) Primary key
Pname Varchar(30)
Company Varchar(50)
Price Decimal(10,2)
Write SQL queries for (a)-(b) and output for (c)-(d):
(a) Display the rows where product name ends with s
(b) Display the details of all those products with price more than 200
(c) SELECT ROUND(7865.954,-2);
(d) SELECT MID(“INNOVATION”,2,3);

Q4. Report File 5


Q5. Project File 5
Q6. Viva 5

You might also like