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)
46 views
38 pages
Practical Record Cbse 2023-2024
Uploaded by
Aryan Gupta
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 record cbse 2023-2024 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
46 views
38 pages
Practical Record Cbse 2023-2024
Uploaded by
Aryan Gupta
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 record cbse 2023-2024 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Practical record cbse 2023-2024 For Later
You are on page 1
/ 38
Search
Fullscreen
COMPUTER SCIENCE. PRACTICAL EXERCISES 2022-23 ‘CLASS - XII PERFORM ARITHMETIC ‘To write a menu driven Python Program to perform Arithmetic operations (+, /) based on the users choice. SOURCE CODE: princOT AGEN Jprine("2. subtraction") Iprinc(r3. woieiplicatson") fprine(r4. Division") jopteint (input ("Enter your chosce:")) laine (input ("Enter the First Mmber:")) fpeint cinput¢ |.¢ optmen: oma Print ("The Addition of two number $a:",e) Joie opemnz: ceed PRINE ("The Subtraction of two number 4s: Joris ope=s: math Print ("The Multiplication of two mumber is:",e) Jerie optwma: Te baw0: Hint ("Enter any other nuaber other than 0") PEINE(The Division of two muaber 4s Jerse print (*Tavalid option’ Result: ‘Thus, the above Python program is executed successfully and the output is verified.Bun=1; 1, Adddition 2. Subtraction 3. Multiplication 4. Division Enter your choice:1 Enter the First Number:10 Enter the Second Nunber:23 The Addition of two number is: BUN-2 1. Adddition 2. Subtraction 3. Multiplication 4. Division Enter your choice:4 Enter the First Numbes Enter the Second Number:0 33 Enter any other number other than 0‘To write a Python Program to display Fibonacci Series up to ‘n’ numbers, jo=int (input ("How many Fibonacci numbers you want to display?")) £ no
ane data th]) tataeyss anata ‘rint("The searched Eaployes ninber is not found") reetese) latasn Program, lereate() [searent) Results ‘Thus, the above Python program is executed successfully and the output Is verified,‘SAMPLE OUTPUT: PYTHON PROGRAM EXECUTED OUTPUT: Enter Employee Nunber:1 Enter Employee Name:Anand Enter Employee Salary:23000 Do you want to continue (y/n) ?:¥ Enter Employee Number:2 Enter Employee Name:Akash Enter Employee Salary:25000 Do you want to continue (y/n) Enter Employee Number:3 Enter Employee Nane:Balu Enter Employee Salary:27000 Do you want to continue (y/n) ?:¥ Enter Employee Nunber:4 Enter Employee Name:Bavya Enter Employee Salary:29000 Do you want to continue (y/n) ?:y Enter Employee Number:5 Enter Employee Name:Mano} Enter Employee Salary: 35000 Do you want to continue (y/n) ?:n Enter Employee nunber to search:3 Employee Deatils are: Mane: Balu Salazy: 27000.0AM: ‘To write a Python program to implement Stack using a list data-structure SOURCE CODE: wlesint input ("Enter the element which you want to push:")) Stick: appendtele) ‘see poPO: ee Stackmet + DEINE ("Stack Ls apty/Undertiow") [Print ("The deleted element 1s:*,Stack-popt)) doe PEEKO. topeten Stack) -1 Deine (othe top most element of Stack is:*,Stack{topl) ee Dispo: open (Stack) -1 Deine (the stack elements are:") or A in range top,-1y-1): eine (Seacklst) seacket) Prine ("stack Operations”) Princesa. posi") Peinet-3. Pebe) Sptninenpee viner your cotee:")) “Sano P08) am cpa epteinput Do you want to perform another stack operstion(y/a)?:") Result: ‘Thus, the above Python program is executed successfully and the output is verified.‘SAMPLE OUTPUT: ‘Python Program Executed Output: Stack operations 2) oP 3) pReK 4, Display, Enter your choice:1 Enter the element which you want to push:10 Do you want to perform afother stack operation (y/n) ?:¥ Stack Operations i. pose 4. Dispay, Enter your choice:1 Enter the element which you want to push:20 Do you want to perform another stack operation(y/n) ?:y Stack Operations, 4. Display Enter your choice:1 Enter the element which you want to push:30 Do you want to perform another stack operation (y/2)?:y Stack Operations 4. Display Enter your choice:3 ‘The top most element of Stack ts: 30 Do you want to perform another stack operation(y/n)?:¥Stack operations 3. PEEK 4. Display Enter your choice:2 3 4, Display Enter your choice: to Do you want to perform another stack operation (y/n) ?:y another stack operation(y/n) ?:nEX.NOL13. DATE: CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON (INSERTING RECORDS AND DISPLAYING RECORDS) AIM: ‘To write a Python Program to integrate MYSQL with Python by inserting records to Emp table and display the records Salaryeine (input (Enter teployes salary (Query="DISERT ITO EMP VAGUES((),"()","()", 1)" format Oo Mano, Gondor, Salazy) ‘optainput "Do you want to add another employes detaiisty/1):*) loveryerseiscr * row mee"; leirsexecute Query) lastaccur.fetehali eines) Result: “Thus, the above Python program is executed successfully and the output is verified,SAMPLE OUTPUT: Python Executed Program Output: Enter Employee Nunber:1 Enter Employee Name:Arun Enter Employee Gender (M/E) :M Enter Employee Salary:20000 Record Stored Successfully Do you want to add another employes Enter Employee Nuaber:? Enter Employee Name:Bala Enter Employee Gender (M/F) :M Enter Employee Salary:25000 Record Stored Successfully Do you want to add ancther employee Enter Employee Nuaber:3 Enter Employee Nane:Bavya Enter Employee Gender (M/F) :F Enter Employee Salary:27000 Record Stored Successfully Do you want to add another employes Enter Employee Nuaber:4 Enter Employee Nane:Saravanan Enter Employee Gender (M/F) :M Enter Employee Salary:29000 Record Stored Successfully Do you want to add another employee (1, ‘Arun’, '*, 20000) (2, ‘Bala’, 'M*, 25000) (3, ‘Bavya’, "F, 27000) (4) ‘Saravanan’ ,/"M", 29000) details (y/n) details (y/n): dotaiis(y/n}: details (y/n}:part CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON {SEARCHING AND DISPLAYING RECORDS) ‘To write a Python Program to integrate MYSQL with Python to search an Employee using EMPID and display the record If present in already existing table EMP, iF not display the appropriate message ‘SOURCE CODE: [impart mysql. connector |conmayeqi connector connect (hoste! localhost! usarnamem’ root! pasavorde! root! databasen' employees! print ase Print (Weleone to Employee Search Screen") Eetar(setesescevecereeerenvescreresennees} Nosint input ("Enter the employee number to search:*)) (Qsorye'SELDcE + FROM IMP WHERE! EXDIDe{) "format Oo) (crr-exeoute avery) datancur.fetchone() rine (data) * prine(Recond not Found! 1") leon.ctose) Result: ‘Thus, the above Python program is executed successfully and the output is verified.SAMPLE OUTPUT: Python Executed Program Output: RUN Welcome to Employee Search Screen Enter the employee number to search:2 (2, "Bala, 'M', 25000) un =2: Welcome to Employee Search Screen Enter the employee number to search:505 Record not Found!!!batt CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON ‘(UPDATING RECORDS) AIM: ‘To write a Python Program to integrate MYSQI. with Python to search an Emplayee Using EMPID and update the Salary of an employee if present in already existing table EMP, if not display the appropriate message. SOURCE CODE: sport myagl connector Print C-welcome to Eaployes detail update Soren") Bovine (apa (unter the employee number to Upsata:")) SeNEnecate eaeey) Setanoue,fetshone Pest tases) Tew_Saleint (input "Ester the tow Salary of an tnmployee:")) (GisUronse bar SE! EALARY=(} WHERE EoGYOe()"- format ew_Sa, Mo) ‘er execute 03) brint (Employee Salary Updated Successfully") Gae'stunct + row Bae” deeonear etebait 0 Result: ‘Thus, the above Python program Is executed successfully and the output is verified.elcone to Employee detail update Screen Do'you want’ to update the Salary of the above employee (y/a)?+y near the lew Salary of an Employee: 30000, Enployee Salary Updated Successfelly 3 saavya’, "e!, S000) Enter the employee number to Update:500 Record not Found!!!‘SOL COMMANDS EXERCISE -1 To write Queries for the following Questions based on the given table: Rolino | Name | Gender | Age | Dept DOA. 1 [Arun | M 24 | COMPUTER | 1997-01-10 2 [-Ankie_[— ae 21—[ HISTORY — | 1998-03-24 3 [ Anu —[—F 20 [HIND 1996-12-12 |“ Bala [a0 19 | NULL [1999-07-01 5 | Charan [Mt 18 | HINDI_|1997.09-05 | 250 6 | Deepa | F 19 | HisToRY [1997-06-27 | 300 7 | Dinesh_| Mt 22 | COMPUTER | 1997-02-25 | 210 B| Usha | F 23 [NULL 1997-07-31 | 200. (a) Write 2 Query to Create a new database in the name of “STUDENTS ‘Sol:mysql> CREATE DATABASE STUDENTS; (©) Write a Query to Open the database "STUDENTS! ‘Sol:mysqb> USE STUDENTS; (e) Write « Query to create the above table called: Info Sol: mysql> CREATE TABLE STU(Rollno int Primary key Name varchar(10),Gender varchar(3), ‘Age int,Dept varchar(15),DOA date,Fees int); (4) Write « Query to list all the existing database names ‘Sot: mysql> SHOW DATABASES; output:(6) Write 2 Query to List all the tables that exists in the current database. Sok; mysql> SHOW TABLES; output: (9 Write « Query to insert all the rows of above table into Info table, Sol INSERT INTO STU VALUES (1,Arun’/M', 24/COMPUTER'’ 1997-01-10, 120); INSERT INTO STU VALUES (2,Ankit/M, 21, MISTORY,;1998-03-24', 200); INSERT INTO STU VALUES (3,Anu’F, 20,HINDI'’1996-12-12, 300} INSERT INTO STU VALUES (4,Bala,’M', 19, NULL,1999-07-01', 400} INSERT INTO STU VALUES (5,Charan’,M, 18,HINDI,1997-06-277, 250}; INSERT INTO STU VALUES (6,Deepa''F', 19,HISTORY’'1997-06-27', 300} INSERT INTO STU VALUES (7,Dinesh’ M’, 22, COMPUTER’ 1997-02-25), 210); INSERT INTO STU VALUES (8,Usha',F, 23, NULL, 1997-07-31’, 200} (a) Write « Query to display all the details ofthe Employees from the above table ‘STU. Sok: mysql> SELECT * FROM STU; output (@) Write a query to Rolino, Name and Department ofthe students from STU table. Sol: ‘mysql> SELECT ROLLNO,NAME,DEPT FROM STU;Bx.No: 17. ‘SQL COMMANDS EXERCISE - 2. DATE: AIM: To write Queries for the following Questions based on the given table: Rolino | Name | Gender | Age | Dept DOA Fees 1 [Arun | M 24 | COMPUTER | 1997-01-10 | 120 2 |Ankie_[— ae 21[HIsTORY — | 1998-03-24 | 200 2 | "Anu | F 20 [HIND 1996-12-12 | 300. 3 —|“-Bala_[ a0 19 [NULL 1999-07-01 | — 400 S| Charan [we 18 HINDE 1997.09.05 | 250 6] Deepa | F 19 | HISTORY | 1997-06-27 | 300 7 | Dinesh | Mt 22 | COMPUTER | 1997-02-25 | 210. 8 | Usha [—F 23 [NULL 1997-07-31 | 200 (a) Write « Query to select distinct Department fom STU table. Sol: ‘mysql> SELECT DISTICT(DEPT) FROM STU; utp (0) To show all information about students of History department. Sol: mysqb>SELECT * FROM STU WHERE DEPT“"HISTORY'; outpu (6) Write a Query to list name of female students in Hindi Department. ‘Sok: mysql> SELECT NAME FROM STU WHERE DEPT='HINDI AND GENDER=F'; " =|(q) Write « Query to list name of the students whose ages are between 18 to 20. Sol: mysql> SELECT NAME FROM STU WHERE AGE BETWEEN 18 AND 20; Quepuc: (6) Write « Query to display the name of the students whose name is starting with 's Sol ‘mysql> SELECT NAME FROM STU WHERE NAME LIKE A%'; output: (f) Write « query to list the names of those students whose name have second alphabet 'n’in thei| mysql> SELECT NAME FROM STU WHERE NAME LIKE "N°;To write Queries for the following Questions based on the given table: Rolino | Name | Gender | Age | Dept DOA 1 [Arun] M 24 | COMPUTER | 1907-01-10 2 |-Ankie_[ ae 21 [HISTORY — | 1998-03-24 2 | "Anu | F 20 [HIND 1996-12-12 3 —|“-Bala_[ a0 19 [NULL 1999.07.01, S| Charan [we 18 HINDE 1997.09.05 | 250 6 | Deepa | F 19 | HISTORY | 1997-06-27 | 300 7 | Dinesh | Mt 22 | COMPUTER | 1997-02-25 | 210. 8 | Usha [—F 23 [NULL 1997-07-31 | 200 (a) Write 2 Query to delete the details of Roll number is 8 Sol mysql> DELETE FROM STU WHERE ROLLNO=8; Output (After Del io (©) Write « Query to change the fess of Student to 170 whose Roll number is 1, ifthe existing fess is less than 130, ‘Sol: mysql> UPDATE STU SET FEES=170 WHERE ROLLNO=1 AND FEES<130; OutputiAfter Update):(6) Write « Query to-add a new column Area of type varchar in table STU: Sok: ‘mysql> ALTER TABLE STU ADD AREA VARCHAR(20}; output: (4 Write a Query to Display Name of all students whose Area Contains NULL. Sol; mysql> SELECT NAME FROM STU WHERE AREA IS NULL; uy (6) Write a Query to delete Area Column from the table STU. Sol mysql> ALTER TABLE STU DROP AREA; outpu (9 Write « Query to delete table from Database Sol ‘mysql> DROP TABLE STU; outpuAIM: To write Queries for the following Questions based on the given table: "TABLE: STOCK Pao | Pname _[Deode | Qty | UnitPrice | StockDate 5008 | Ballpoint pen | 102 | 100" [10 2021-03-31 5003__| Gel pen premium | 102 [150 [15 2021.01.01 5002 | Peneil 1o1_[125 [4 2021-02-18 5006 | Seale 101 [200 [6 2020-01-01 5001 | Eraser 102[210 [3 2020-03-19 5004 | Sharpner 102 [60 —|s. 2020-12-09 5009 | Gel pen lassie | 103 | 160 | 8 2022-01-19 ‘TABLE: DEALERS Deode | name 101 | Sakthi Stationeries 103 sic Stationeries 102 Indian Book Hotse (a) To display the total Unit price ofall the products whose Deode as 102. ‘mysql> SELECT SUM(UNITPRICE) FROM STOCK GROUP BY DCODE HAVING ‘DCODE=102; Output: (0) To display details ofall products in the stock table in descending order of Stock date. sol mysql> SELECT * FROM STOCK ORDER BY STOCKDATE DESC;(e) To display maximum unit price of products for each dealer individually as per deode from the table Stock. Sol: mysql> SELECT DCODE,MAX(UNITPRICE) FROM STOCK GROUP BY DCODE; ‘Output: (4) To display the Pname and Dname from table stock and dealers Sol: mysql> SELECT PNAME,DNAME FROM STOCK S,DEALERS D WHERE S.DCOD! output:
You might also like
Computer Class 12 Project
PDF
100% (1)
Computer Class 12 Project
39 pages
Practical File Final
PDF
No ratings yet
Practical File Final
43 pages
Class 12 Cs Project
PDF
No ratings yet
Class 12 Cs Project
32 pages
Grade 12 Physics Practical Manual
PDF
No ratings yet
Grade 12 Physics Practical Manual
24 pages
Class 12 Practical List 2025-26
PDF
No ratings yet
Class 12 Practical List 2025-26
27 pages
Xiics Practical
PDF
No ratings yet
Xiics Practical
55 pages
Final Practical File of 2024-25 Class 12
PDF
No ratings yet
Final Practical File of 2024-25 Class 12
46 pages
12 Practical File 2024-25-1
PDF
No ratings yet
12 Practical File 2024-25-1
45 pages
CS Practical File
PDF
No ratings yet
CS Practical File
44 pages
Computer Science Lab Record
PDF
No ratings yet
Computer Science Lab Record
43 pages
21-05-23 - Isr - Iit - Star Co-Sc (Model-A) - Jee Adv - 2019 (P-Ii) - Cat-17 - QP
PDF
No ratings yet
21-05-23 - Isr - Iit - Star Co-Sc (Model-A) - Jee Adv - 2019 (P-Ii) - Cat-17 - QP
24 pages
Xii Cs Practical Record
PDF
100% (1)
Xii Cs Practical Record
20 pages
Fibonacci Series: Pgm:no 1 8/06/2023 Aim
PDF
No ratings yet
Fibonacci Series: Pgm:no 1 8/06/2023 Aim
65 pages
Practical File Divyanshu
PDF
No ratings yet
Practical File Divyanshu
44 pages
Practical File (Raj)
PDF
No ratings yet
Practical File (Raj)
18 pages
Programfiles Grade12
PDF
No ratings yet
Programfiles Grade12
26 pages
CS Practical
PDF
No ratings yet
CS Practical
74 pages
Gr12 - Prac Record Programs - 24-25
PDF
No ratings yet
Gr12 - Prac Record Programs - 24-25
65 pages
12 Cs Lab Progrms 1 20
PDF
No ratings yet
12 Cs Lab Progrms 1 20
39 pages
Program
PDF
No ratings yet
Program
44 pages
Practical File CS 2024 25 (Word)
PDF
No ratings yet
Practical File CS 2024 25 (Word)
48 pages
Output
PDF
No ratings yet
Output
60 pages
Xii Final Practicals Xii B
PDF
No ratings yet
Xii Final Practicals Xii B
48 pages
NSPV CS Practical File - 2023-2024
PDF
No ratings yet
NSPV CS Practical File - 2023-2024
47 pages
Report File Computer 240102 232550
PDF
No ratings yet
Report File Computer 240102 232550
45 pages
Tesara Lond
PDF
No ratings yet
Tesara Lond
47 pages
Cs Practical Payal 18
PDF
No ratings yet
Cs Practical Payal 18
40 pages
Computer Practical
PDF
No ratings yet
Computer Practical
44 pages
CS Project File
PDF
No ratings yet
CS Project File
45 pages
Record 20
PDF
No ratings yet
Record 20
40 pages
Alpine - Cs - 12
PDF
No ratings yet
Alpine - Cs - 12
51 pages
Shashaa FINAL PRACTICAL
PDF
No ratings yet
Shashaa FINAL PRACTICAL
46 pages
Xii - Practicals 24-25
PDF
No ratings yet
Xii - Practicals 24-25
48 pages
Project
PDF
No ratings yet
Project
44 pages
Board Practical Source Code - 2024-2025
PDF
No ratings yet
Board Practical Source Code - 2024-2025
25 pages
12th Practical File For Print - 23-24
PDF
No ratings yet
12th Practical File For Print - 23-24
50 pages
Class 12 Cs Practical Programs 2023-2024 (Updated)
PDF
No ratings yet
Class 12 Cs Practical Programs 2023-2024 (Updated)
43 pages
Gr12 - Prac Record Programs - 24-25
PDF
No ratings yet
Gr12 - Prac Record Programs - 24-25
29 pages
Download
PDF
No ratings yet
Download
46 pages
Computers Science
PDF
No ratings yet
Computers Science
30 pages
STD XII CS Rec 2023-24
PDF
No ratings yet
STD XII CS Rec 2023-24
41 pages
CS Practical File - Adarsh
PDF
No ratings yet
CS Practical File - Adarsh
30 pages
XII Practical File CS
PDF
No ratings yet
XII Practical File CS
36 pages
Raksha Xiics Practical 2022-23
PDF
No ratings yet
Raksha Xiics Practical 2022-23
53 pages
12 083 23-24
PDF
No ratings yet
12 083 23-24
39 pages
Practicals Prgms 12 A
PDF
No ratings yet
Practicals Prgms 12 A
25 pages
Record Practicals - Xii
PDF
No ratings yet
Record Practicals - Xii
30 pages
Solution-Of-Practicals-Class-Xii-Comp.-Sci.-083-2022-23 SV
PDF
No ratings yet
Solution-Of-Practicals-Class-Xii-Comp.-Sci.-083-2022-23 SV
33 pages
LabManual (1 13)
PDF
No ratings yet
LabManual (1 13)
24 pages
Cs File Kchi - Merged
PDF
No ratings yet
Cs File Kchi - Merged
20 pages
06 Python Tutorial
PDF
No ratings yet
06 Python Tutorial
16 pages
Computer Science Practical Exercises 2024
PDF
No ratings yet
Computer Science Practical Exercises 2024
15 pages
Class-Xii: Subject - Computer Science (083) Practical File Solution 2020-21 Objective & Solution 1
PDF
No ratings yet
Class-Xii: Subject - Computer Science (083) Practical File Solution 2020-21 Objective & Solution 1
36 pages
Abcd 1
PDF
No ratings yet
Abcd 1
53 pages
Cs Programs 2024-2025
PDF
No ratings yet
Cs Programs 2024-2025
58 pages
Cs Record File
PDF
No ratings yet
Cs Record File
19 pages
Hospital Management System
PDF
No ratings yet
Hospital Management System
19 pages
Practical qns+2 CS2022
PDF
No ratings yet
Practical qns+2 CS2022
31 pages
G12 - Computer Science - Lab Programs 1 To 20
PDF
No ratings yet
G12 - Computer Science - Lab Programs 1 To 20
19 pages
12.12.21 - SR - STAR CO-SC - MODEL-A & B - Jee - Adv - 2017 - P1 - PTA-12 - QP - F
PDF
No ratings yet
12.12.21 - SR - STAR CO-SC - MODEL-A & B - Jee - Adv - 2017 - P1 - PTA-12 - QP - F
18 pages
Test 23
PDF
No ratings yet
Test 23
12 pages
Incoming Class 12 Star Co SC Model-A Adv Cat-16 BKC Analysis 07-05-2023
PDF
No ratings yet
Incoming Class 12 Star Co SC Model-A Adv Cat-16 BKC Analysis 07-05-2023
4 pages
DocScanner 08 May 2023 3 25 PM
PDF
No ratings yet
DocScanner 08 May 2023 3 25 PM
59 pages
SR Star - Pta-12 - Physics Assignment (Only For Toppers) Key - 18-10-2023
PDF
No ratings yet
SR Star - Pta-12 - Physics Assignment (Only For Toppers) Key - 18-10-2023
21 pages
Incoming Class 12 Star Co SC Model-A Adv Wat-39 BKC Analysis 21-05-2023
PDF
No ratings yet
Incoming Class 12 Star Co SC Model-A Adv Wat-39 BKC Analysis 21-05-2023
5 pages
Class 12 SR Iit Star Co SC Model (A, B,&C) Pta-14 Analysis 11-11-2023
PDF
No ratings yet
Class 12 SR Iit Star Co SC Model (A, B,&C) Pta-14 Analysis 11-11-2023
2 pages
Assignment 45 - Modern Physics (X-Rays)
PDF
No ratings yet
Assignment 45 - Modern Physics (X-Rays)
3 pages