Yuvraj CS

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

CERTIFICATE

This is to certify that  Y U V R A J C H A U D H A R Y


 of class XII (Science) of JAYPEE VIDYA MANDIR, TOMRI
(BULANDSHAHR) has completed the Practical Project in
Computer Science on languages “Python and MySQL” himself
under the supervision and guidance of Computer Science Teacher,
Mr. ANKIT during the academic session 2022-23. The progress of
the project has been continuously reported and has been in my
knowledge consistently.

______________ _______________ _____________


Signature of Signature of Signature of
Principal External Subject
Invigilator Teacher
ACKNOWLEDGEMENT
First of all, I am deeply thankful to my Chemistry Teacher MR.

ANKIT 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.

I am also thankful to all my respected teachers, library staff, office


staff and staff members of the Computer Laboratory of the school.

Last but no the least I am indebted to my friends, classmates and


parents for encouraging and never let me down in my confidence
while completing the project.
Python
1. A python script to input the values of Principal, Rate, and Time and calculate
SI and CI.

Output:

2. Python script to input two numbers from the user and store these values in
two different variables

Output:
3. Script to Convert Seconds into hours, minute and seconds

Output:

4. To print list of names of students in reverse order


Output:
5. Find prime numbers between 1 and n number

Output:
6. Program to print the even elements using fucntion

Output:
7. To print number ending with 0 from a list

Output:
8. To print odd numbers from a list

Output:

9. Program to print the sum of 'n' natural numbers using recursion function
Output:

10. Program to print the sum of all the elements in the list using recursion

Output:
11. Program to print original list

Output:

12. To verify wheter a list is empty or not

Output:
13. Sum of first n terms of series:

Output:
14. Program to find the number of digits in a number:

Output:

15. Reading whole content of the file:


Output:

SQL
Enter the database Rishabh
Enter the password for MySQL CHUTIYA#1
Enter the table name EMP
Successfully Connected to Database
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Recod
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 "Rishabh Rawat"
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"
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 Recod
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')
(116, 'Piyush Sony', 'Sales', 'Manager', 55000, 'Noida')
(117, 'Makrand Gupta', 'Account', 'Clerk', 16000, 'Delhi')
(118, 'Harish Makhija', 'Computer', 'Programmer', 34000, 'Noida')
(120, 'Rishabh Rawat', 'Computer', 'Coder', 100000, 'Srinagar')
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Recod
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, 'Rishabh Rawat', 'Computer', 'Coder', 100000, 'Srinagar')]
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Recod
6. Exit
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 Rishabh Rawat
Enter the new basic 200000
Record sucessfully modified
1. Insert Record
2. Display Record
3. Search Record
4. Modify Record
5. Delete Recod
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

MySQL queries:
1. SELECT * FROM job;

2. SELECT jobtitle,salary FROM job;

3. SELECT * FROM job WHERE salary>100000;


4. SELECT MAX(salary) FROM job;

5. SELECT COUNT(DISTINCT jobtitle) FROM job;


6. SELECT * FROM job WHERE jobtitle LIKE “R%”

7. SELECT * FROM job ORDER BY salary ASC;

8. . SELECT SUM(salary) AS “TOTAL SALARY” FROM job;


9. SELECT * FROM CLUB;

10. SELECT * FROM CLUB GROUP BY SPORTS;

11. SELECT * FROM EMP;


12. . SELECT CITY,COUNT(*) FROM EMP GROUP BY CITY HAVING
COUNT(*)>1;

13. . SELECT DEPT,SUM(basic) AS “TOTAL SALARY” FROM EMP GROUP BY


DEPT;

14. SELECT * FROM GROUP BY CITY HAVING basic>30000;


15. SELECT * FROM WHERE CITY=”Noida” ORDER BY basic ASC;

You might also like