Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
118 views
22 pages
Practical File 12.
Practical file.
Uploaded by
vikassolanki110new
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Practical file 12. For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
118 views
22 pages
Practical File 12.
Practical file.
Uploaded by
vikassolanki110new
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Practical file 12. For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Practical file 12. For Later
You are on page 1
/ 22
Search
Fullscreen
CERTIFICATE This is to certify that Ms./Mr. board roll number student of class xi SCIENCE from SHREE SWAMINARAYAN GURUKUL,SALVAV has successfully completed his practical work for academic session 2024-25 under my supervision and guidance in partial fulfillment of SSCE Informatics practices (065)practical examination. External examiner Teacher in-charge Principal School SealINTRODUCTION NAME CLASS : XII Science SUBJECT _ : Informatics Practices SCHOOL: Shree Swaminarayan English Med. CBSE school Salvav SUBMITTED TO :Mrs. Archana DeshmukhACKNOWLEDGEMENT I would like to thank my teacher Mrs. ARCHANA DESHMUKH and principal ma’am Mrs. Minal Desai for giving me the opportunity to do this practical file. This also helped me in doing a lot of research and increased my knowledge in difficult topics.PYTHON PROGRAMS Questions Createa series of these numbers:33,55,65,29,19,23. reatea series of 10 numbers starting with 41 and with the increment of 3. Create a series of 10 numbers using ndarray. Create a series and print the top 3 and bottom 3 elements using the head and tail functions. Write code to show al attributes of series. Use seriesin QI. Use Series created in Q2 ad find output of following commands:- sf:2), s[1:3] & s[[1,3,4]]. Write code to change value 29 and 23 from series Q1. Write code to sort series in descending order-(Use Q3). Create a dataframe countries using a dictionary which stored 5 country name, capitals and populations of the country. Index will be years. Write a program to show alll attributes of dataframe created in Q9. Create a dataframe players to store 10 players with their highest and lowest score no_of matches columns. Player names are indices of dataframe. Perform following questions:- 1a) Show data of any two players using loc function. 1b) Show any two columns. c) Show data of two rows and two colurans using loc function. d)Make use of rename command to change column name no_of matches to Matches played. e) Drop rowof last player. ‘Make multiple bar graph for dataframe created in Q11. Create line graph for temp. seven days of week. Create histogram to show salesof one month data. Createcsv file from dataframe players. Make sure null values arehandled properly. Create csv file in excel. Open csv in dataframe, Make use of nrows ‘command. Create database DATA Create the following table product Table: Products Apple Sony Philips iPhone LED TV Bluetooth Speaker Show table structure, ‘Show records of table products. Show products of pcode P1001 and P1005, ‘Show data of products starting with i ‘Show data ofall products whose quantity>50 and price>30000. |Show sum of price ofall products. Show product names in upper case and also length of all products. ‘Show product name and qty joined with space under heading “Product and Qty”. Fra Display first2 and last2 letters from Pname. Write queries using emp! table: ‘Show totalemployeesworking ineach department. ‘Show avg salary of each job ‘Show min salary of each department where minimum employees are > 3. Write queries using empl and dept table: ‘Show employee names and location of job. ‘Show avg salary of employees working in sales department. ‘Show ename, salary,dname, and location and all employees. ED” ‘current date and time. Display day of week, day ofyear and day name for current date. a drop the table product 5PYTHON PROGRAM 1) Create a series of these numbers: 33,55,65,29,19,23. cope: import pandas as pd 1d Series({33,55,65,29,19,23]) print(s1) ‘ouTPu’ Cleo ir) 2) Create aseries of 10 numbers starting with 41 and with the increment of. cope: import pandasas pd sn= 41 im=3 af] for iin range(10}: a.append(sn) sn= sneim 1d Series(a) print(m) ouTpuT:- oye UL3) Createa series of 10 numbers using ndarray. CODE: import pandas as pd import numpy as np \d.Series(np.arange(1, 11) print(s) OUTPUT:- dtype: inté4 4) Create a series and print the top 3 and bottom 3 elements using the head and tail functions, CODE: import pandas as pd 10, 20, 30, 40, 50, 60, 70, 80, 90, 100] d.Series(s) print(s1.head(3)) print(s1.tail(3)) ouTPUT-5) Write CODE to show all attributes of series. Use series created in Q1. CODE import pandas as pd 5=pd.Series([33,55,65,29,19,23]) print(s5{:]) ouTpur:- Cie 6) Use Series created in Q2 and find OUTPUT of following commands: s{: :2] s[1:3] s{{1,3,4]] CODE: print{m{::2]) print(m{2:3)) print(m({2,3,4]]) OUTPUT:- 8 Cie Uns rel ar) Clover ns cer) ce Cisvoceme UnsWrite CODE to change value 29 and 23 from series of Q1. cope: import pandas as pd si=pd.Serles([33,55,65,29,19,23}) s1[3]=30 s1(5]=28 print(s1) ourpur:- Chey eee Cet) Write CODE to sort series in descending cope: import pandas as pd Import numpy as np s=pd.Serles(np.arange(1, 11)) print(s) s=s.sort_values(ascending=False) print(s) ourpur: as order-(Use — Q3).9) Create a dataframe countries using a dictionary which stored 5 countryname, capitals and populations of the country. Index will be years, cove import pandas as pd countrles= pd.DataFrame(({ ‘Country’: ['USA’, ‘Canada’, 'UK’, ‘Germany, 'France'], ‘capital’: [Washington D.C. 'Ottawa', ‘London’, ‘Berlin’, "Paris'], ‘Population’: (331002651, 37742154, 67886011, 83783942, 65273511] 3), ['2021 1021','2022', '2023','2024']) print{cou ntries) OUTPUT- fers) Capital Population ry Ut cee BER. feTT Tr Chae) Brae vaLs UK OE aa Sg ed 10) Write program to show all attributes of dataframe created in Q9. cope: import pandas as pd import numpy as np ‘Country’: ['United States’, France’, ‘Brazil, Japan’, ‘Australia'], ‘Capital’: ['Washington, D.C. ‘Paris’, ‘Brasilia’, ‘Tokyo’, 'Canberra'], ‘Population’: (1000000, 2000000, 1500000, 2500000, 1800000]} $10 = pd.DataFrame(data, index=[2020, 2021, 2022, 2023, 2024]) print(S10[:]) ouTPUT- Cars: United state Peery11) Create dataframe players to store 10 players with their highest and lowest score no_of matches columns. Player names are indices of dataframe. perform following questions:- a) Show data of any two players using loc function. b) Show any two columns. )Show data of two rows and two columns using loc function. d) Make use of rename command to change column name no_of_matches to Matches_played €) drop row of last player. cope: import pandas as pd players=pd.DataFrame( { ‘layer’: ['Playert!, 'Player2', 'Player3', 'Player4!, 'Players', 'Player6', 'Player7’, ‘Players’, ‘Players, 'Player10', 'Highest_Score’: (98, 89, 95, 87, 99, 92, 96, 90, 88, 94], ‘Lowest_Score’: [45, 55,50, 42, 48, 51,46, 56, 49, 47], 'Matches_played': (30, 35, 32, 33,31, 29, 34, 30, 36, 37] y players.set_index('Player’, inplace=True) print(‘a)Show data of any two players usingloc function’) print(players.loc{{'Player1’, 'Player3"]}) print('b}Show any two columns’) print(players{{'Highest_Score’, 'Lowest_Score'}}) print('c) Show data of two rows and two columns using loc function’) print(players.loc{{'Player2', Players'], [‘Highest_Score’, 'Lowest_Score']]) print('d) Make use of rename command to change column name no_of_matches to Matches_played') players.rename(columns={'Matches_played’: ‘no_of_matches'}, inplace=True) print('Drop the row of the last player’) players.drop('Player10’, inplace=True) print('Displaythe updated DataFrame') print(players) OUTPUT:-12) Make multiple bar graph for dataframe created in Q.11 CODE: Import pandas as pd import matplotlib.pyplot as pit players = pd.DataFrame({ ‘Player’: ‘Player’, 'Player2’, 'Players', Player4’, ‘Players’, ‘Players’, 'Player7’,'Player8', ‘Player9', 'Player10'], "Highest_Score': [98, 89, 95, 87,99, 92, 96, 90,88, 94], "Lowest_Score':[45,55, 50, 42, 48, 51,46, 56, 49, 47], 'Matches_played': [30, 35, 32, 33, 31, 29, 34, 30, 36, 37] » players.set_index('Player', inplace=True) players{['Highest_Score’, '‘Lowest_Score']].plot(kind="bar, figsize=(10, 6)) pit.title('Highest and Lowest Score for Players’) pltxlabel('Players') pltyylabel('Scores') plt.xticks(rotation=45) plt.show() OUTPUT:- OM hk he Oe CE13) Create line graph for temp. of seven days of week CODE: Import matplotlib.pyplot as plt days_of_week = ['Monday,, ‘Tuesday’, ‘Wednesday’, ‘Thursday, ‘Friday’, ‘Saturday’, ‘sunday'] temperature = [65, 68, 70, 72, 59, 57, 73] pit.plot(days_of_week, temperature, marker='o', inestyl pit-title("Temperature for Seven Days of the Week’) pit.xlabel('Day of the Week’) pit.ylabel('Temperature (°F)') pit.show() ourpuT:- ‘Temperature for Seven Days of the Week ‘Monday Tuesday Wednesday Thursday friday Saturday Sunday Day of the Week14) Create histogram to show sales of one month data. cope: import matplotlib.pyplot as pit sales_data = (110, 125, 125, 145, 135, 115, 110, 120, 135, 140, 130, 130, 140, 175, 135, 145, 125, 135, 140, 150, 140, 130, 160, 155, 125, 160, 140, 145] pit hist(sales_data, bins=15, edgecolor="y') plt.title('Sales Histogram for One Month’) pit.xlabel('Sales Amount’) pit.ylabel('Frequency') pit.show() OuTPUT:- Sales Histogram for One Month uo 080 Sales Amount15) Create csv file from dataframe players, Make sure null valuesare handled properly. cope: players=pd.DataFrame( { ‘Player’: [’Playert', 'Player2’, 'Player3', ‘Player4’, 'PlayerS', ‘Players’, 'Player7’, 'Player8','Player9', 'Player10'), 'Highest_Score': [100, 150, 80, None, 200, 90, 110, 130, None, 170}, "Lowest _Score': [30, 40,20, 50, 60, 35, 25, None, 55, 70], 'Matches_played': [50, None, 60, 55, 40, 48, None, 42, 47, 49] a) players.set_index('Player', inplace=True) players=players.fillna(‘N/A’) players.to_csv(‘players_data.csv’) ourPuT:- ayer Mighest Score Lowest Score Ne of Mathes 40WA « 0 2 16) Create csv file in excel. Open csv in dataframe. Make use of nrows ‘command, CODE: Import pandas as pd Df=pd.read_csv(‘csv.csv’,nrows=5) print(0f) UTPUT:- Population Hospitals Schools Govt_officers Multiplex Malls 123415121 132-3871 54152 15247 45364 165345345 195 4025 «315427 2444287645 214763548 1001258 2457515284 51470 514582475 «145.1240 43200 © 433351433Create the following table products. i eee AM Stoo P1001 | iPad 120| 15000] Apple P1002| LEDTV__| 100| 85000| Sony DSLR P1003 | Camera 10 | 25000] Philips P1004| iPhone__| 50 | 95000] Apple P1005 LEDTV__| 20 | 45000] MI. Bluetooth Speaker P1006 100] 20000] Ahuja 16Show table structure. 1) Ose i Ee Cees U Me ae DSc eae ose aT rely urs e3] Lae varchar(20) ree | Crete I pt | Dae | | | i] is] | Price | int rae Company | varchar(10) na ws in set (0.06 si 2) Show records oftable products. eee ees R rr are Pcode | Pname eT) PEO) 25000 rT) 3) Ee mer ett ae me TM rr tes -> where Pcode in ('P1001', 'P1005'); " | Company | iPad | 120 | 15000 LED Tv | 20 | 45000 + 7Cel eee ee eer ad Se eae Se Cua os + 5060 | Apple | Cee yacd NEE eet eae et mee ta Sse) se OME Bs
select sum(Price)"Total_Price" from Products; = " | Total_Price | 18'8) Show product name and qty joined with space under heading “product and Qty’ er Enemy PM Sse or ers resets i i ote f eRe | | DSLR Camera | eo | etc eves) | te I rons in set (0.60 1910) Write queries usingemp! table: in set (0.00 sec) cl ory tr ea Er mets Show min salary of each department where minimum employees are>3. mysql> select deptno , min(sal) from enpl Seren mC CMe eur meu Cuet Een rows in set (0.60 sec 2011) Write queries ising empl and dept table Show employee names and their location of job Sec ee eee cee er et SCS ments on oma eee Cae mer Cee CS CET or et SETH on Ce ar BINA en re ee, select avg(sal) from empl e, dept PO eRe Lr er ac | " | 5 ce careers Peers ara 7 SALES SETH air ase | Reig orn | KOLKATA marys | KOLKATA onc se: ers | NEW DELK ocr eis ery mera. a SHIVANSH | 2U50 Raa ees ANIR Emme isc rg fin eee Brrr erm ae ie Eee aa Pea) cant Semel is Crd 212) Display current date and time. mysql> SELECT NOW()"Current_Date_Time"; ce | Current_Date_Time a Hy chad fh 22
You might also like
IP Practical File 2024-25
PDF
100% (7)
IP Practical File 2024-25
22 pages
Pandas Practicals - Term-1
PDF
100% (1)
Pandas Practicals - Term-1
18 pages
Ip 12th Practical
PDF
No ratings yet
Ip 12th Practical
22 pages
Ip Final Practical File
PDF
No ratings yet
Ip Final Practical File
22 pages
Practical File 12th
PDF
No ratings yet
Practical File 12th
19 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
21 pages
IP Practical File 2022
PDF
No ratings yet
IP Practical File 2022
26 pages
GE02 (DAVP) Assignment
PDF
No ratings yet
GE02 (DAVP) Assignment
3 pages
Ip Practical
PDF
No ratings yet
Ip Practical
31 pages
IP Practical File2
PDF
No ratings yet
IP Practical File2
35 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
26 pages
IP Record Python 23-24 Aryan
PDF
No ratings yet
IP Record Python 23-24 Aryan
42 pages
VSG Ip Practical Index-1
PDF
No ratings yet
VSG Ip Practical Index-1
4 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
34 pages
Python Code 6-10 Class X
PDF
No ratings yet
Python Code 6-10 Class X
6 pages
Practical - With Solution - XII - IP
PDF
No ratings yet
Practical - With Solution - XII - IP
13 pages
Xii - Ip - Holiday HW
PDF
No ratings yet
Xii - Ip - Holiday HW
2 pages
QP DAV 3rd Sem Dec 2023
PDF
No ratings yet
QP DAV 3rd Sem Dec 2023
12 pages
Ip Practical Index
PDF
No ratings yet
Ip Practical Index
6 pages
Page-03 To 10
PDF
No ratings yet
Page-03 To 10
8 pages
Ip Final File
PDF
No ratings yet
Ip Final File
46 pages
SET 1 Part A Marks, (
PDF
No ratings yet
SET 1 Part A Marks, (
10 pages
ANNANYA 12B (Practical File)
PDF
No ratings yet
ANNANYA 12B (Practical File)
36 pages
Even Students
PDF
No ratings yet
Even Students
36 pages
Ip File
PDF
No ratings yet
Ip File
66 pages
12 IP Practical Exampl
PDF
No ratings yet
12 IP Practical Exampl
6 pages
Khadeeja - DS - PRACTICAL 4
PDF
No ratings yet
Khadeeja - DS - PRACTICAL 4
24 pages
Ip Project Work 2
PDF
No ratings yet
Ip Project Work 2
52 pages
Practical File
PDF
No ratings yet
Practical File
19 pages
National Public School: Name-Mohit Kumar Class-XII Subject - Informatics Practices (065) Board Roll No.
PDF
No ratings yet
National Public School: Name-Mohit Kumar Class-XII Subject - Informatics Practices (065) Board Roll No.
35 pages
Python Practical Questions
PDF
No ratings yet
Python Practical Questions
13 pages
IP Practical
PDF
No ratings yet
IP Practical
28 pages
PRACTICAL File For Informatics Practices
PDF
No ratings yet
PRACTICAL File For Informatics Practices
5 pages
CBSE Board Practical IP Question Bank
PDF
No ratings yet
CBSE Board Practical IP Question Bank
6 pages
Practical File IP Class 12 2024 25 Sharing Removed
PDF
No ratings yet
Practical File IP Class 12 2024 25 Sharing Removed
29 pages
Ip Practical File
PDF
No ratings yet
Ip Practical File
23 pages
IP Practical Record 2022-23
PDF
No ratings yet
IP Practical Record 2022-23
43 pages
Vanshika Goyal Gec Practicals
PDF
No ratings yet
Vanshika Goyal Gec Practicals
31 pages
X-AI Practical File-2 (2024)
PDF
No ratings yet
X-AI Practical File-2 (2024)
17 pages
Practical File Question 28.09.2022
PDF
No ratings yet
Practical File Question 28.09.2022
15 pages
IP Practical 2023-24 (1 To 34)
PDF
100% (1)
IP Practical 2023-24 (1 To 34)
32 pages
Add A Little Bit of Body Text PDF
PDF
No ratings yet
Add A Little Bit of Body Text PDF
6 pages
XII IP Board Practical File
PDF
No ratings yet
XII IP Board Practical File
7 pages
Practical File 2024
PDF
No ratings yet
Practical File 2024
25 pages
Yashica IP Practical
PDF
No ratings yet
Yashica IP Practical
51 pages
Practical 1
PDF
No ratings yet
Practical 1
65 pages
XII IP Practical List 2023-24
PDF
No ratings yet
XII IP Practical List 2023-24
4 pages
DAV Practical
PDF
No ratings yet
DAV Practical
12 pages
Journal
PDF
No ratings yet
Journal
35 pages
Practical (Data Science)
PDF
No ratings yet
Practical (Data Science)
13 pages
Pragya File
PDF
No ratings yet
Pragya File
31 pages
Ids 1
PDF
No ratings yet
Ids 1
30 pages
PC File
PDF
No ratings yet
PC File
26 pages
12th Practical
PDF
No ratings yet
12th Practical
21 pages
Practical File Infomatics Practices 2024-25
PDF
No ratings yet
Practical File Infomatics Practices 2024-25
39 pages
VSG Ip Practical Index-1
PDF
No ratings yet
VSG Ip Practical Index-1
6 pages
Xii Ip Ut 1 MS 24 25
PDF
No ratings yet
Xii Ip Ut 1 MS 24 25
9 pages
Practical For Class XII
PDF
No ratings yet
Practical For Class XII
19 pages
Oddstudents
PDF
No ratings yet
Oddstudents
35 pages