PRACTICE Practical Question Python 2024-25
PRACTICE Practical Question Python 2024-25
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-B
Subject: COMPUTER SCIENCE (083) Max. Marks: 30
Python (8 Marks)
1 Write a menu driven program to implement a stack operations of 8
i)Push
ii)POP
iii)Display,
using a list data-structure.
SQL queries (4 Marks)
2 Create a table name Student and insert the records with following 4
table:
TABLE: STUDENT
RollNo Name Batch DOA Mark1 Mark2
8369 SENTHIL SCIENCE 2012-03-22 78 80.04
8499 ANYA COMMERCE 2012-03-14 90 40.50
8521 SETHU SCIENCE 2012-04-28 45 50.65
8566 MANU ARTS 2012-04-01 100 95.45
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-C
Subject: COMPUTER SCIENCE (083) Max. Marks: 30
Python (8 Marks)
1 Write a Python code to Create a text file with the following Text 8
“CBSE stands for CENTRAL BOARD OF SECONDARY
EDUCATION. It has presence around the world and is considered as
one of the prestigious boards across.” (minimum of 3 lines)
Write a function Display() to print the following details :
a) Size of the text file
b) Total number of lines
c) Total number of words
d) Total number of vowels
SQL queries (4 Marks)
2 Create a table name Emp and insert the records with following table: 4
TABLE: EMP
EmpID Name Designation DOJ Salary Comm
8369 SMITH CLERK 1990-12-18 800 NULL
8499 ANYA SALESMAN 1991-02-20 1600 300
8521 SETHU SALESMAN 1991-02-22 1250 500
8622 RAGHU CLERK 1989-02-28 1000 NULL
Python (8 Marks)
1 Write a python program 8
a) To create a text file ‘<Name>_details.txt’
b) Add student details of Name, Grade and Sec for 4 students.
c) Write a function to count the name of the students from the text
file whose name starts with the letter “A”.
SQL queries (4 Marks)
2 Create a table name Salesman and insert the records with following 4
table:
TABLE: SALESMAN
DEPT_CODE SNAME SALARY BONUS DOJ
MKT Beena Mehta 30000 45.23 2019-10-29
ACC K. L. Sahay 50000 25.34 2018-03-13
ADM Nisha Thakkar 30000 35.00 2017-03-18
ACC Leela Yadav 80000 NULL 2018-12-31
MKT Gautam Gola 20000 NULL 1989-01-23
Python (8 Marks)
1 Write a python program 8
a) To create a binary file ‘<Name>_bin’
b) Write the following content into the binary file
“Computer Science is a discipline of Engineering where
students are taught coding and designing.”
c) Display the number of vowels/ consonants/uppercase/
lowercase characters in the file.
SQL queries (4 Marks)
2 Create a table name Student and insert the records with following 4
table:
TABLE: STUDENT
RollNo Name Batch DOA Mark1 Mark2
8369 SARAYU SCIENCE 2012-03-22 78 80.04
8499 ANYA COMMERCE 2012-03-14 90 40.50
8521 SETHU SCIENCE 2012-04-28 NULL 50.65
8566 MANU ARTS 2012-04-01 100 95.45
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-F
Subject: COMPUTER SCIENCE (083) Max. Marks: 30
Python (8 Marks)
1 Create PushBook() and DispBook() methods/function Python to add 8
a new book details and display book details
(Book Title ,Author name and publisher) from the a list of books,
considering them to act as insert and display operations of the Stack
data structure.
SQL queries (4 Marks)
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-G
Subject: COMPUTER SCIENCE (083) Max. Marks: 30
Python (8 Marks)
1 Write a python program 8
a) To create a csv file ‘<Name>.csv’
b) Add student details of Name, Grade and Sec for 3 students.
c) Write a function to display the details of all the students from the
csv file.
SQL queries (4 Marks)
2 Create a table name Salesman and insert the records with following 4
table:
TABLE: SALESMAN
DEPT_CODE SNAME SALARY BONUS DOJ
MKT Beena Mehta 30000 45.23 2019-10-29
ACC K. L. Sahay 50000 25.34 2018-03-13
ADM Nisha Thakkar 30000 35.00 2017-03-18
ACC Leela Yadav 80000 NULL 2018-12-31
MKT Gautam Gola 20000 NULL 1989-01-23
Python (8 Marks)
1 Write a Python program: 8
a) To create a binary file named <Name>_data.
b) Write the following content into the binary file:
"Python programming is widely used in data science, web
development, and automation."
c) Read the content from the binary file and display the count of
digits/special characters/word and lines.
2 Create a table name Student and insert the records with following 4
table:
TABLE: STUDENT
RollNo Name Batch DOA Mark1 Mark2
8369 SENTHIL SCIENCE 2012-03-22 78 80.04
8499 ANYA COMMERCE 2012-03-14 90 40.50
8521 SETHU SCIENCE 2012-04-28 45 50.65
8566 MANU ARTS 2012-04-01 100 95.45
3 Report 7
4 Project 8
5 Viva 3
Total 30