Professional Documents
Culture Documents
Harsh CS Project
Harsh CS Project
Harsh CS Project
(Bulandshahr)
1
CERTIFICATE
This is to certify that H A R S H B H A TI of class XII (Science) of
JAYPEE VIDYA MANDIR, TOMRI (BULANDSHAHR) has completed
the Investigatory Project in Computer Science titled “ Python and
MySQL” himself under the supervision and guidance of Computer
Science Teacher, MR. ANKIT KUMAR during the academic session
2022-23. The progress of the project has been continuously reported
and has been in my knowledge consistently.
2
ACKNOWLEDGEMENT
First of all, I am deeply thankful to my Computer Science Teacher MR.
ANKIT KUMAR for extending his valuable and scholarly guidance
throughout the preparation of this project. I wish to extend my sincere
thanks to MRS. SANGITA SINGH respected Principal, JAYPEE VIDYA
MANDIR, TOMRI (BULANDSHAHR) for her continuous motivation
and moral support for completing the work.
3
Python
OUTPUT:
4
2. Python script to input two numbers from the user
and store these values in two different variables.
OUTPUT:
5
3. Script to Convert Seconds into hours, minute and
seconds
OUTPUT:
6
4. To print list of names of students in reverse order
OUTPUT:
7
5. Find prime numbers between 1 and n number
OUTPUT:
8
6. Program to print the even elements using function
OUTPUT:
9
7. To print number ending with 0 from a list
OUTPUT:
10
8. To print odd numbers from a list
OUTPUT:
11
9. Program to print the sum of 'n' natural numbers
using recursion function
OUTPUT:
12
10.Program to print the sum of all the elements in the
list using recursion
OUTPUT:
OUTPUT:
13
12.To verify whether a list is empty or not
OUTPUT:
OUTPUT:
14
14.Program to find the number of digits in a number:
OUTPUT:
15
15.Reading whole content of the file:
OUTPUT:
16
SQL
Enter the database Himanshu
Enter the password for MySQL CENTER@123#1
Enter the table name EMP
Successfully Connected to Database
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Record
6. Exit
Enter the choice 1
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the EMPNO 120
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the EMPNAME "Himanshu Pal"
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the DEPT "Computer"
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the DESIGN "Coder"
17
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the basic 100000
NOTE: Please enter string/varchar/date values (if
any) in quotes
Enter the CITY "Srinagar"
Record successfully inserted
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Record
6. Exit
Enter the choice 2
Enter the number of records to display 10
(111, 'Akash Narang', 'Account', 'Manager', 50000,
'Dehradun')
(112, 'Vijay Duneja', 'Sales', 'Clerk', 21000,
'Lucknow')
(113, 'Kunal Bose', 'Computer', 'Programmer',
45000, 'Delhi')
(114, 'Ajay Rathor', 'Account', 'Clerk', 26000,
'Noida')
(115, 'Kiran Kukreja', 'Computer', 'Operator', 30000,
'Dehradun')
18
(116, 'Piyush Sony', 'Sales', 'Manager', 55000,
'Noida')
(117, 'Makrand Gupta', 'Account', 'Clerk', 16000,
'Delhi')
(118, 'Harish Makhija', 'Computer', 'Programmer',
34000, 'Noida')
(120, 'Himanshu Pal', 'Computer', 'Coder', 100000,
'Srinagar')
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Record
6. Exit
Enter the choice 3
Enter the column name using which you want to
find the record EMPNO
Enter the EMPNO of that record 120
[(120, 'Himanshu Pal', 'Computer', 'Coder', 100000,
'Srinagar')]
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Record
6. Exit
19
Enter the choice 4
Enter the field name to modify basic
Enter the column name using which you want to
find the record EMPNAME
Enter the EMPNAME of that record Himanshu Pal
Enter the new basic 200000
Record successfully modified
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Record
6. Exit
Enter the choice 5
Enter the column name using which you want to
find the record
NOTE: NO TWO RECORDS SHOULD HAVE SAME
VALUE FOR THIS COLUMN: EMPNO
Enter the EMPNO of that record 120
Record successfully deleted
20
MySQL queries:
21
III. SELECT * FROM job WHERE salary>100000;
22
VII. SELECT * FROM job ORDER BY salary ASC;
23
X. SELECT * FROM CLUB GROUP BY SPORTS;
24
XIII. SELECT DEPT,SUM(basic) AS “TOTAL SALARY”
FROM EMP GROUP BY DEPT;
25