SlideShare a Scribd company logo
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

interenship.pptx
interenship.pptxinterenship.pptx
interenship.pptx
Naveen316549
 
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
KiranKumari204016
 
Arrays in C
Arrays in CArrays in C
Arrays in C
Kamruddin Nur
 
L5 array
L5 arrayL5 array
Learning R
Learning RLearning R
Learning R
Kamal Gupta Roy
 
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
ansh552818
 
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
rajputaman7777777
 
Python Cheat Sheet Presentation Learning
Python Cheat Sheet Presentation LearningPython Cheat Sheet Presentation Learning
Python Cheat Sheet Presentation Learning
Naseer-ul-Hassan Rehman
 
Array,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN CArray,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN C
naveed jamali
 
Presentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptxPresentation on Pandas in _ detail .pptx
Presentation on Pandas in _ detail .pptx
16115yogendraSingh
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
NishantKumar1179
 
R Activity in Biostatistics
R Activity in BiostatisticsR Activity in Biostatistics
R Activity in Biostatistics
Larry Sultiz
 
Micro project project co 3i
Micro project project co 3iMicro project project co 3i
Micro project project co 3i
ARVIND 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.docx
richardnorman90310
 
Dax queries.pdf
Dax queries.pdfDax queries.pdf
Dax queries.pdf
ntrnbk
 
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
carliotwaycave
 
C Language Lecture 10
C Language Lecture 10C Language Lecture 10
C Language Lecture 10
Shahzaib Ajmal
 
Econometria aplicada com dados em painel
Econometria aplicada com dados em painelEconometria aplicada com dados em painel
Econometria aplicada com dados em painel
Adriano Figueiredo
 
Operating system labs
Operating system labsOperating system labs
Operating system labs
bhaktisagar4
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
RaajTech
 

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

interenship.pptx
interenship.pptxinterenship.pptx
interenship.pptx
 
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
 
Python Cheat Sheet Presentation Learning
Python Cheat Sheet Presentation LearningPython Cheat Sheet Presentation Learning
Python Cheat Sheet Presentation Learning
 
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
 

Recently uploaded

RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
OH TEIK BIN
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 

Recently uploaded (20)

RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 

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;