SlideShare a Scribd company logo
1 of 6
Download to read offline
AISSCE 2021(Sample Practical Paper)
SET-A
Subject- Informatics Practices (065)
M.Marks-30 Time-3 Hours
1. Write a program to create a dataframe a list containing dictionaries of the exam performances of five
students- 8
Name Eng Acct Eco Bst IP
Pankaj 67 78 89 76 90
Rekha 98 87 84 89 93
Ajay 98 56 49 87 76
Raju 34 51 76 54 67
Suraj 78 54 45 63 61
Perform the following-
• Display the DataFrame
• Add the another column PE:[56,78,98,45,78]
• Display from 1st
to 3rd
rows
• Display the columns from Name to Eco.
• D display another column ‘Total ‘which will show the total marks of all subjects
• Display the rows in order of total
2. Table: Employee 7
No Name Salary Zone Age Grade Dept
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Mokesh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30
Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for
the following queries: -
• To display 2nd
to 4th
letters from all names.
• Display the highest and lowest salaries of the employees .
• Display lowest salary all employees where names contain 5 characters.
• Display zone wise highest salary having highest salary above 35000.
• To display no of employees in each department where minimum salary is 30000.
3. Practical File 5
4. Project Work 5
5.Viva-Voce 5
Solution
1.
import pandas as pd
result={'Name':['Pankaj','Rekha','Ajay','Raju','Suraj'],'Eng':[67,98,98,34,78], 'Acct':[78,87,56,51,54],
'Eco':[89,84,49,76,45],
'Bst':[76,89,87,54,63],
'IP':[90,93,76,67,61]}
df=pd.DataFrame(result)
print(df)
df['PE']=[56,78,98,45,78]
print(df)
print(df[0:3])
print(df.rename(columns={"Bst":"BStudies"}))
print(df.iloc[:,0:4])
df['Total']=df['Eng']+df['Acct']+df['Eco']+df['Bst']+df['IP']+df['PE']
print(df)
print(df.sort_values(by=['Total']))
2.
create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone varchar(15),Age
integer(4),Grade char(1),Dept integer(4));
insert into Employee values(1,'mukul',30000,'west',28,'A',30);
insert into Employee values(2,'kritika',35000,'centre',30,'A',10);
insert into Employee values(3,'naveen',32000,'west',40,null,10);
insert into Employee values(4,'uday',38000,'north',38,'A',30);
insert into Employee values(5,'nupur',32000,'east',26,null,20);
insert into Employee values(6,'mokesh',37000,'south',28,'B',10);
insert into Employee values(7,'shelly',36000,'north',26,'A',30);
Select substr(Name,2,3) from Emplyee;
Select Max(salary),Min(salary) from Employee;
Select min(salary) from Employee where length(name)=5;
Select zone,max(salary) from Employee group by zone having max(salary)>35000;
Select dept,count(*),min(salary) from Employee group by dept having min(salary)=30000;
AISSCE 2021(Sample Practical Paper)
SET-B
Subject- Informatics Practices (065)
Marks-30 Time-3 Hours
1. Write command to create a datafarme with following list of values
A=[[23,56,87,98],[78],[32,54],[43,65,90]]
Write command for the following-
• Display the DataFrame
• To count the number of non-NA values present each column and rows in the dataframe
• Replace all NaN values of 2nd
column with 50 and 4th
column with 70.
• To transpose the dataframe
• To fill missing values by copying value from above adjacent cell 8
2. Table: Employee 7
No Name Salary Zone Age Grade Dept
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Mokesh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30
Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for
the following queries: -
• To display first three letters from all names.
• To display the total salary for all the employees who are from West zone.
• To count no of employees without any grade.
• To display zone wise highest salary and lowest salary.
• To display minimum age of employees in each zone whose name start with ‘N’.
3. Practical File 5
4. Project Work 5
5.Viva-Voce 5
Solution:
1. import pandas as pd
A=[[23,56,87,98],[78],[32,54],[43,65,90]]
df=pd.DataFrame(A)
print(df)
print(df.count())
print(df.count(1))
print(df.fillna({1:50,3:70}))
print(df.T)
print(df.fillna(method='ffill'))
2.
create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone
varchar(15),Age integer(4),Grade char(1),Dept integer(4));
insert into Employee values(1,'mukul',30000,'west',28,'A',30);
insert into Employee values(2,'kritika',35000,'centre',30,'A',10);
insert into Employee values(3,'naveen',32000,'west',40,null,10);
insert into Employee values(4,'uday',38000,'north',38,'A',30);
insert into Employee values(5,'nupur',32000,'east',26,null,20);
insert into Employee values(6,'mokesh',37000,'south',28,'B',10);
insert into Employee values(7,'shelly',36000,'north',26,'A',30);
Select left(Name,3) from Emplyee;
Select sum(Salary) from Employee where dept=10 and zone=”west”;
Select count(*)from Employee where grade is NULL;
Select zone,max(salary),min(salary) from Employee group by zone;
Select zone,min(age) from Employee where zone like”N%” group by zone ;
AISSCE 2021(Sample Practical Paper)
SET-C
Subject- Informatics Practices (065)
M.Marks-30 Time-3 Hours
1. Write a program in Python Pandas to create the following DataFrame batsman from a Dictionary:
B_NO Name Score1 Score2
1 Sunil Pillai 90 80
2 Gaurav Sharma 65 45
3 Piyush Goel 70 90
4 Kartik Thakur 80 76
Perform the following operations on the DataFrame :
1)Display the DataFrame.
2)Add both the scores of a batsman and assign to column “Total”
3)Display the highest score in both Score1 and Score2 of the DataFrame.
4)Display the lowest score in Score2.
5)Display no of records present in each rows and columns.
6)Display sum of Score1 . 8
2. Table: Employee 7
No Name Salary Zone Age Grade Dept
1 Mukul 30000 West 28 A 10
2 Kritika 35000 Centre 30 A 10
3 Naveen 32000 West 40 20
4 Uday 38000 North 38 C 30
5 Nupur 32000 East 26 20
6 Mokesh 37000 South 28 B 10
7 Shelly 36000 North 26 A 30
Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for
the following queries: -
• To display employee name and zone together.
• To display the average salary of all the employees whose names start with ‘N’.
• To count zone wise no of employees where no of employees less than 2.
• To display department wise highest, lowest ,total and average salary.
• To display zone wise average salary where average salary is above 35000 in descending
order of zone name.
3. Practical File 5
4. Project Work 5
5. Viva-Voce 5
Solution:
1.
import pandas as pd
d1={'B_NO':[1,2,3,4],'Name':["Sunil Pillai","Gaurav Sharma","Piyush Goel","Kartik Thakur"],
'Score1':[90,65,70,80],'Score2':[80,45,95,76]}
df=pd.DataFrame(d1)
print(df)
df['Total'] = df['Score1']+ df['Score2']
print(df)
print("Maximum scores are : " ,max(df['Score1']), max(df['Score2']))
print("Minimum score of Score2:",min(df['Score2']))
print("The number records present in each rows in the dataframe is",(df.count(axis=1)))
print("The number records present in each columns in the dataframe is",(df.count(axis=0)))
print("The sum of Score1 is",(df['Score1'].sum()))
2.
create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone varchar(15),Age
integer(4),Grade char(1),Dept integer(4));
insert into Employee values(1,'mukul',30000,'west',28,'A',30);
insert into Employee values(2,'kritika',35000,'centre',30,'A',10);
insert into Employee values(3,'naveen',32000,'west',40,null,10);
insert into Employee values(4,'uday',38000,'north',38,'A',30);
insert into Employee values(5,'nupur',32000,'east',26,null,20);
insert into Employee values(6,'mokesh',37000,'south',28,'B',10);
insert into Employee values(7,'shelly',36000,'north',26,'A',30);
Select concat(Name,Zone) from Employee;
Select Avg(Salary) from Employee where Name like”N%”;
Select zone,count(*) from Employee group by zone having count(*)>2;
Select dept,max(salary),min(salary),sum(salary),avg(salary)from Employee group by dept;
Select zone,avg(salary)from Employee group by zone having avg(salary)>35000 order by zone;

More Related Content

Similar to XIIInfo.Pract.PT3277.pdf

Term 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfTerm 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfKiranKumari204016
 
12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdfansh552818
 
12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdfrajputaman7777777
 
Array,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN CArray,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN Cnaveed jamali
 
Presentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptxPresentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptx16115yogendraSingh
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using PythonNishantKumar1179
 
R Activity in Biostatistics
R Activity in BiostatisticsR Activity in Biostatistics
R Activity in BiostatisticsLarry Sultiz
 
Micro project project co 3i
Micro project project co 3iMicro project project co 3i
Micro project project co 3iARVIND SARDAR
 
data_selectionOctober 19, 2022[1] # Data Selection.docx
data_selectionOctober 19, 2022[1] # Data Selection.docxdata_selectionOctober 19, 2022[1] # Data Selection.docx
data_selectionOctober 19, 2022[1] # Data Selection.docxrichardnorman90310
 
Dax queries.pdf
Dax queries.pdfDax queries.pdf
Dax queries.pdfntrnbk
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxcarliotwaycave
 
Econometria aplicada com dados em painel
Econometria aplicada com dados em painelEconometria aplicada com dados em painel
Econometria aplicada com dados em painelAdriano Figueiredo
 
Operating system labs
Operating system labsOperating system labs
Operating system labsbhaktisagar4
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answerRaajTech
 
Introduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordIntroduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordLakshmi Sarvani Videla
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxgilpinleeanna
 

Similar to XIIInfo.Pract.PT3277.pdf (20)

Term 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdfTerm 2 CS Practical File 2021-22.pdf
Term 2 CS Practical File 2021-22.pdf
 
Arrays in C
Arrays in CArrays in C
Arrays in C
 
L5 array
L5 arrayL5 array
L5 array
 
Learning R
Learning RLearning R
Learning R
 
12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf
 
12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf12th-computer-science-practical-study-material-english-medium.pdf
12th-computer-science-practical-study-material-english-medium.pdf
 
Array,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN CArray,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN C
 
Presentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptxPresentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptx
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
R Activity in Biostatistics
R Activity in BiostatisticsR Activity in Biostatistics
R Activity in Biostatistics
 
Micro project project co 3i
Micro project project co 3iMicro project project co 3i
Micro project project co 3i
 
data_selectionOctober 19, 2022[1] # Data Selection.docx
data_selectionOctober 19, 2022[1] # Data Selection.docxdata_selectionOctober 19, 2022[1] # Data Selection.docx
data_selectionOctober 19, 2022[1] # Data Selection.docx
 
Dax queries.pdf
Dax queries.pdfDax queries.pdf
Dax queries.pdf
 
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docxINFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
INFORMATIVE ESSAYThe purpose of the Informative Essay assignme.docx
 
C Language Lecture 10
C Language Lecture 10C Language Lecture 10
C Language Lecture 10
 
Econometria aplicada com dados em painel
Econometria aplicada com dados em painelEconometria aplicada com dados em painel
Econometria aplicada com dados em painel
 
Operating system labs
Operating system labsOperating system labs
Operating system labs
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
 
Introduction to Data Science With R Lab Record
Introduction to Data Science With R Lab RecordIntroduction to Data Science With R Lab Record
Introduction to Data Science With R Lab Record
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
 

Recently uploaded

Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Recently uploaded (20)

Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

XIIInfo.Pract.PT3277.pdf

  • 1. AISSCE 2021(Sample Practical Paper) SET-A Subject- Informatics Practices (065) M.Marks-30 Time-3 Hours 1. Write a program to create a dataframe a list containing dictionaries of the exam performances of five students- 8 Name Eng Acct Eco Bst IP Pankaj 67 78 89 76 90 Rekha 98 87 84 89 93 Ajay 98 56 49 87 76 Raju 34 51 76 54 67 Suraj 78 54 45 63 61 Perform the following- • Display the DataFrame • Add the another column PE:[56,78,98,45,78] • Display from 1st to 3rd rows • Display the columns from Name to Eco. • D display another column ‘Total ‘which will show the total marks of all subjects • Display the rows in order of total 2. Table: Employee 7 No Name Salary Zone Age Grade Dept 1 Mukul 30000 West 28 A 10 2 Kritika 35000 Centre 30 A 10 3 Naveen 32000 West 40 20 4 Uday 38000 North 38 C 30 5 Nupur 32000 East 26 20 6 Mokesh 37000 South 28 B 10 7 Shelly 36000 North 26 A 30 Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for the following queries: - • To display 2nd to 4th letters from all names. • Display the highest and lowest salaries of the employees . • Display lowest salary all employees where names contain 5 characters. • Display zone wise highest salary having highest salary above 35000. • To display no of employees in each department where minimum salary is 30000. 3. Practical File 5 4. Project Work 5 5.Viva-Voce 5
  • 2. Solution 1. import pandas as pd result={'Name':['Pankaj','Rekha','Ajay','Raju','Suraj'],'Eng':[67,98,98,34,78], 'Acct':[78,87,56,51,54], 'Eco':[89,84,49,76,45], 'Bst':[76,89,87,54,63], 'IP':[90,93,76,67,61]} df=pd.DataFrame(result) print(df) df['PE']=[56,78,98,45,78] print(df) print(df[0:3]) print(df.rename(columns={"Bst":"BStudies"})) print(df.iloc[:,0:4]) df['Total']=df['Eng']+df['Acct']+df['Eco']+df['Bst']+df['IP']+df['PE'] print(df) print(df.sort_values(by=['Total'])) 2. create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone varchar(15),Age integer(4),Grade char(1),Dept integer(4)); insert into Employee values(1,'mukul',30000,'west',28,'A',30); insert into Employee values(2,'kritika',35000,'centre',30,'A',10); insert into Employee values(3,'naveen',32000,'west',40,null,10); insert into Employee values(4,'uday',38000,'north',38,'A',30); insert into Employee values(5,'nupur',32000,'east',26,null,20); insert into Employee values(6,'mokesh',37000,'south',28,'B',10); insert into Employee values(7,'shelly',36000,'north',26,'A',30); Select substr(Name,2,3) from Emplyee; Select Max(salary),Min(salary) from Employee; Select min(salary) from Employee where length(name)=5; Select zone,max(salary) from Employee group by zone having max(salary)>35000; Select dept,count(*),min(salary) from Employee group by dept having min(salary)=30000;
  • 3. AISSCE 2021(Sample Practical Paper) SET-B Subject- Informatics Practices (065) Marks-30 Time-3 Hours 1. Write command to create a datafarme with following list of values A=[[23,56,87,98],[78],[32,54],[43,65,90]] Write command for the following- • Display the DataFrame • To count the number of non-NA values present each column and rows in the dataframe • Replace all NaN values of 2nd column with 50 and 4th column with 70. • To transpose the dataframe • To fill missing values by copying value from above adjacent cell 8 2. Table: Employee 7 No Name Salary Zone Age Grade Dept 1 Mukul 30000 West 28 A 10 2 Kritika 35000 Centre 30 A 10 3 Naveen 32000 West 40 20 4 Uday 38000 North 38 C 30 5 Nupur 32000 East 26 20 6 Mokesh 37000 South 28 B 10 7 Shelly 36000 North 26 A 30 Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for the following queries: - • To display first three letters from all names. • To display the total salary for all the employees who are from West zone. • To count no of employees without any grade. • To display zone wise highest salary and lowest salary. • To display minimum age of employees in each zone whose name start with ‘N’. 3. Practical File 5 4. Project Work 5 5.Viva-Voce 5
  • 4. Solution: 1. import pandas as pd A=[[23,56,87,98],[78],[32,54],[43,65,90]] df=pd.DataFrame(A) print(df) print(df.count()) print(df.count(1)) print(df.fillna({1:50,3:70})) print(df.T) print(df.fillna(method='ffill')) 2. create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone varchar(15),Age integer(4),Grade char(1),Dept integer(4)); insert into Employee values(1,'mukul',30000,'west',28,'A',30); insert into Employee values(2,'kritika',35000,'centre',30,'A',10); insert into Employee values(3,'naveen',32000,'west',40,null,10); insert into Employee values(4,'uday',38000,'north',38,'A',30); insert into Employee values(5,'nupur',32000,'east',26,null,20); insert into Employee values(6,'mokesh',37000,'south',28,'B',10); insert into Employee values(7,'shelly',36000,'north',26,'A',30); Select left(Name,3) from Emplyee; Select sum(Salary) from Employee where dept=10 and zone=”west”; Select count(*)from Employee where grade is NULL; Select zone,max(salary),min(salary) from Employee group by zone; Select zone,min(age) from Employee where zone like”N%” group by zone ;
  • 5. AISSCE 2021(Sample Practical Paper) SET-C Subject- Informatics Practices (065) M.Marks-30 Time-3 Hours 1. Write a program in Python Pandas to create the following DataFrame batsman from a Dictionary: B_NO Name Score1 Score2 1 Sunil Pillai 90 80 2 Gaurav Sharma 65 45 3 Piyush Goel 70 90 4 Kartik Thakur 80 76 Perform the following operations on the DataFrame : 1)Display the DataFrame. 2)Add both the scores of a batsman and assign to column “Total” 3)Display the highest score in both Score1 and Score2 of the DataFrame. 4)Display the lowest score in Score2. 5)Display no of records present in each rows and columns. 6)Display sum of Score1 . 8 2. Table: Employee 7 No Name Salary Zone Age Grade Dept 1 Mukul 30000 West 28 A 10 2 Kritika 35000 Centre 30 A 10 3 Naveen 32000 West 40 20 4 Uday 38000 North 38 C 30 5 Nupur 32000 East 26 20 6 Mokesh 37000 South 28 B 10 7 Shelly 36000 North 26 A 30 Create the above table-Employee and insert all the rows. Based on this tables write SQL statements for the following queries: - • To display employee name and zone together. • To display the average salary of all the employees whose names start with ‘N’. • To count zone wise no of employees where no of employees less than 2. • To display department wise highest, lowest ,total and average salary. • To display zone wise average salary where average salary is above 35000 in descending order of zone name. 3. Practical File 5 4. Project Work 5 5. Viva-Voce 5
  • 6. Solution: 1. import pandas as pd d1={'B_NO':[1,2,3,4],'Name':["Sunil Pillai","Gaurav Sharma","Piyush Goel","Kartik Thakur"], 'Score1':[90,65,70,80],'Score2':[80,45,95,76]} df=pd.DataFrame(d1) print(df) df['Total'] = df['Score1']+ df['Score2'] print(df) print("Maximum scores are : " ,max(df['Score1']), max(df['Score2'])) print("Minimum score of Score2:",min(df['Score2'])) print("The number records present in each rows in the dataframe is",(df.count(axis=1))) print("The number records present in each columns in the dataframe is",(df.count(axis=0))) print("The sum of Score1 is",(df['Score1'].sum())) 2. create table Employee(No integer(4),Name varchar(28),Salary decimal(8,2),Zone varchar(15),Age integer(4),Grade char(1),Dept integer(4)); insert into Employee values(1,'mukul',30000,'west',28,'A',30); insert into Employee values(2,'kritika',35000,'centre',30,'A',10); insert into Employee values(3,'naveen',32000,'west',40,null,10); insert into Employee values(4,'uday',38000,'north',38,'A',30); insert into Employee values(5,'nupur',32000,'east',26,null,20); insert into Employee values(6,'mokesh',37000,'south',28,'B',10); insert into Employee values(7,'shelly',36000,'north',26,'A',30); Select concat(Name,Zone) from Employee; Select Avg(Salary) from Employee where Name like”N%”; Select zone,count(*) from Employee group by zone having count(*)>2; Select dept,max(salary),min(salary),sum(salary),avg(salary)from Employee group by dept; Select zone,avg(salary)from Employee group by zone having avg(salary)>35000 order by zone;