0% found this document useful (0 votes)
43 views

PRACTICALFILE - CS Ns

The document contains the practical record file of a student named Nidhi Singh studying in class 12th for the subject Computer Science. It includes the index containing 25 programs written by the student along with their signatures and questions from 10-21 with SQL queries and their outputs related to tables SchoolBus, Employee, Dept, Product, Client and Tech_Courses. The file is certified by the teacher in charge of the subject.

Uploaded by

Mannat Bhagat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

PRACTICALFILE - CS Ns

The document contains the practical record file of a student named Nidhi Singh studying in class 12th for the subject Computer Science. It includes the index containing 25 programs written by the student along with their signatures and questions from 10-21 with SQL queries and their outputs related to tables SchoolBus, Employee, Dept, Product, Client and Tech_Courses. The file is certified by the teacher in charge of the subject.

Uploaded by

Mannat Bhagat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

LANCER’S CONVENT SCHOOL

PRACTICAL RECORD FILE


COMPUTER SCIENCE (083)
2023-24

NAME: NIDHI SINGH


CLASS:- XII-B
ADM NO. :- 12620
ROLL NO:- 23
TEACHER INCHARGE:- MS.REKHA MAHAJAN
CERTIFICATE
This is to certify that NIDHI SINGH , Admission No. 12620

Roll No: 23 of Class XII , SESSION: 2023-2024 has prepared the Practical
file as per the prescribed Practical syllabus.

COMPUTER SCIENCE(083)

Class XII (C.B.S.E.)

Under my supervision and I am completely satisfied by the


performance.
I wish him all the success in life

SIGNATURE OF TEACHER

NIDHI SINGH/12620/XII-B
INDEX
S.NO. PROGRAM SIGN.
01. Write a program that accepts a string as a parameter
to a function and counts the number of upper case
letters and lower case letters.
02. Write a Python program to find the factorial of a
number using default parameters. (Include proper
error condition for a negative number as input.)

03. Write a program to demonstrate the concept of the


scope of a variable.
04. Write a program to create a function & input 10
numbers from the user and count & return how many
of these are whole numbers.

05. Create a function calculator() to perform basic


mathematical operations and return multiple values
and print them individually.
06. Read a text file and display the number of
vowels/consonants/uppercase/lowercase characters
in the file.
07. Copy the contents of one text file to another text file by removing all the
lines that contain the character 'a'.
08. Create a binary file with name and roll number. Search for a given roll
number and display the name, if not found display an appropriate
message.
09. Create a binary file with roll number, name, and marks. Input a roll
number and update the marks.
10. Write a Python script to create a dictionary with player's name and their
scores. Write a function that accepts this dictionary as an argument and
displays the name of the player with the highest score.

11. Create a binary file GIFT having GiftID, gift name, remarks and price
and display details of those gifts, which has remarks as “ÖN
DISCOUNT”.
12 Write a Python script to read a VEHICLE.CSV file containing
Vehicle_Id, VehicleName, ManufatureYear having a comma as a
delimiter. Display those records where the voter age is more than 65.
Display any number of records from the bottom.
13. Create a CSV file by entering user-id and password, read and search for
the password for the given user-id.

NIDHI SINGH/12620/XII-B
14. Write a program to count the number of records present in
“customers.csv” file.
15. Write a Python menu-based program to implement a stack using the list.
1. Push 2. Pop 3. Peek 4. Show Stack 5.Exit

16. Write a random number generator that generates random numbers


between 1 and 6 (simulates a dice).

17. Write a menu-driven Python program to implement a stack storing


employee number, name and basic using a list data-structure.
18. MySQL Commands based on Table: SchoolBus
19. MySQL Commands based on two tables EMPLOYEE and DEPT with
proper primary key & foreign key.
20. MySQL Commands based on two tables PRODUCT and CLIENT, with
proper primary key & foreign key
21. MySQL Commands based on Table: Tech_Courses
22. Integrate MySQL with Python by importing a suitable module and then
create the table product with the following details
productno,productname,price,purchasedate,quantity , add five records in
the table, and then retrieve all the records in proper format in Python.
23. Perform a delete query on the table products to delete the product having
price greater than 100 using Python MySQL connectivity.
24. Write a program to connect with database employee and table emp with
following fields empno,empname ,dept,salary and store record of an
employee and then display it based on employee number entered by the
user.
25. Write a program to connect with database employee and then update the
department and salary (as per user requirements) after accepting
employee number from the user.

NIDHI SINGH/12620/XII-B
Q10. Write a Python script to create a dictionary with player's
name and their scores. Write a function that accepts this
dictionary as an argument and displays the name of the player
with the highest score.

INPUT:

OUTPUT:

NIDHI SINGH/12620/XII-B
Q11. Create a binary file GIFT having GiftID, gift name, remarks and
price and display details of those gifts, which has remarks as “ÖN
DISCOUNT”

INPUT:

OUTPUT:

NIDHI SINGH/12620/XII-B
Q12. Write a Python script to read a VEHICLE.CSV file containing
Vehicle_Id, VehicleName, ManufatureYear having a comma as a
delimiter. Display those records where the voter age is more
than 65. Display any number of records from the bottom.

INPUT:

OUTPUT:

NIDHI SINGH/12620/XII-B
Q13. Create a CSV file by entering user-id and password, read

and search for the password for the given user-id.

INPUT:

NIDHI SINGH/12620/XII-B
OUTPUT:

Q14. Write a program to count the number of records present in


“customers.csv” file.

INPUT:

OUTPUT:

NIDHI SINGH/12620/XII-B
Q15 Write a Python menu-based program to implement a stack
using the list.

1.Push 2. Pop 3. Peek 4. Show Stack 5.Exit

INPUT

OUTPUT:

NIDHI SINGH/12620/XII-B
Q16 Write a random number generator that generates random
numbers between 1 and 6 (simulates a dice).

INPUT

OUTPUT

NIDHI SINGH/12620/XII-B
Q17 Write a menu-driven Python program to implement a stack
storing employee number, name and basic using a list data-
structure.

INPUT

OUTPUT

NIDHI SINGH/12620/XII-B
Q18. Create the following table and write the MySQL queries for the given
statements:
(a) To show all information of students where capacity is more than the no of
student in order of rtno.
(b) To show area_covered for buses more than 20 km., but charges less than
80000.
(c) To show rtno, area_covered and average cost per student for all routes where
average cost
per student is charges/noofstudents.
(d) To show the number of areas covered by all the bus routes.
(e) To show the number of area covered by each transporter.
(f) To show transporter wise total number of students traveling.
(g) Give the output considering the original relation as given :
i. select distinct transporter from schoolbus ;
ii. select count(distinct transporter) from schoolbus ;
iii. select transporter, max(charges) from schoolbus group by transporter;

NIDHI SINGH/12620/XII-B
(a)

(b)

(c)

NIDHI SINGH/12620/XII-B
(d)

(e)

(f)

NIDHI SINGH/12620/XII-B
(g)(i)

(g)(ii)

(g)(iii)

NIDHI SINGH/12620/XII-B
Q19. Consider the two tables EMPLOYEE and DEPT with proper primary key &
foreign key.
(a) Show the minimum, maximum and average salary of Managers.
(b) Display the designation wise list of employees with name, Sal and date of
joining.
(c) Count the number of Clerks in an organization.
(d) Count the number of employees who are not getting commission.
(e) Show the average salary for all departments with more than or equal to 2
working people.
(f) List the count of employees grouped by deptno.
(g) Display the name of employees who has name starting with “A”.
(h) Display the name of employees working in the same city where they belong.
(i) Display the name of employees who is managing sales department.
(j) Display the name who are working in Delhi and getting more than 5000
(k) Delete the record of the employee whose designation is operator
(l) Delete the column join date from the table employee.

NIDHI SINGH/12620/XII-B
(a)

(b)

(c)

(d)

NIDHI SINGH/12620/XII-B
(e)

(f)

(g)

NIDHI SINGH/12620/XII-B
(h)

(i)

(j)

NIDHI SINGH/12620/XII-B
(k)

(l)

NIDHI SINGH/12620/XII-B
Q20 . Create the following table PRODUCT and CLIENT, with proper primary key &
foreign key and answer the questions given below.
(a) To display the details of those clients whose city is “Delhi”.
(b) To display the details of products whose price is in the range of 50 to 100.
(c) To display the client name , city from table client and product name and price
from the table product with their corresponding matching p_id.
(d) To increase the price of the product by 10.
(e) Add a new column country to the table product.

(a)

(b)

(c)

NIDHI SINGH/12620/XII-B
(d)

(e)

NIDHI SINGH/12620/XII-B
Q21. Create the following table Tech_Courses and give the output of the queries
given:
(i) SELECT COUNT(DISTINCT(TID)) FROM TECH_COURSE;
(ii) SELECT TID, COUNT(*), MIN(FEES) FROM TECH_COURSE GROUP BY TID
HAVING COUNT(TID)>1;
(iii) SELECT CNAME FROM TECH_COURSE WHERE FEES>15000 ORDER BY
CNAME;
(iv) SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000
AND 17000;

(i)

(ii)

(iii)

(iv)

NIDHI SINGH/12620/XII-B
Q22.Integrate MySQL with Python by importing a suitable
module and then create the table product with the following
details product no,product name,price,purchase date,quantity ,
add five records in the table, and then retrieve all the records
in proper format in Python.

INPUT

NIDHI SINGH/12620/XII-B
OUTPUT

NIDHI SINGH/12620/XII-B
Q23 Perform a delete query on the table products to delete the product
having price greater than 100 using Python MySQL connectivity

INPUT

OUTPUT

NIDHI SINGH/12620/XII-B
Q24 Write a program to connect with database employee and table
emp with following fields empno,empname ,dept,salary and store
record of an employee and then display it based on employee number
entered by the user.

INPUT

NIDHI SINGH/12620/XII-B
NIDHI SINGH/12620/XII-B
OUTPUT

NIDHI SINGH/12620/XII-B
Q25.Write a program to connect with database employee and
then update the department and salary (as per user
requirements) after accepting employee number from the user.

INPUT

NIDHI SINGH/12620/XII-B
OUTPUT

NIDHI SINGH/12620/XII-B

You might also like