0% found this document useful (0 votes)
14 views8 pages

PRACTICE Practical Question Python 2024-25

The document outlines various sets of Computer Science exam questions, each with a maximum score of 30 marks. Each set includes Python programming tasks, SQL queries, and sections for reports, projects, and viva. The tasks involve file creation, data manipulation, and querying databases with specific requirements for student and employee records.

Uploaded by

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

PRACTICE Practical Question Python 2024-25

The document outlines various sets of Computer Science exam questions, each with a maximum score of 30 marks. Each set includes Python programming tasks, SQL queries, and sections for reports, projects, and viva. The tasks involve file creation, data manipulation, and querying databases with specific requirements for student and employee records.

Uploaded by

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

Set-A

Subject: COMPUTER SCIENCE (083) Max. Marks: 30


Python (8 Marks)
1 Write a python program 8
a) To create a binary file ‘<Name>_details’
b) Add details of 3 students’ roll number and name.
c) Search for a given roll number and display the name, if not found
display appropriate message.
SQL queries (4 Marks)
2 Create a table name Employee and insert the records with following 4
table:
TABLE: EMPLOYEE
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

Answer the following sql queries:


a) Display all the record whose name is starting with either ‘R’ or
‘A’ of the table Employee.
b) Display details of employees who are not getting comm.
c) Display the employee records in order(ascending) by DOJ.
d) Update the salary of SALESMAN with an increment of 10 percent
of Salary.

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

Answer the following sql queries:


a) Display the records whose name has ‘H’ as second last character.
b) Increase the marks of students by 5 marks who scored less than 75
in Mark1.
c) Display the name of the student who obtained highest marks for the
Mark1.
d) Display the number of students studying in each Batch.

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

Answer the following sql queries:


a) Display the records in descending order of salary.
b) Display the names of the employees whose who joined on or
before 1991-01-01.
c) Display the number of employees who do not have Comm.
d) Display the Minimum and Average salary of employees for each
Designation.
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-D

Subject: COMPUTER SCIENCE (083) Max. Marks: 30

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

Answer the following sql queries:


a) Display all the record whose name is starting with either ‘B’ or
ending with ‘A’.
b) Display average salary of salesmen who are not getting bonus.
c) Display the various department code that are listed in the given
table.
d) Display the Maximum and Average salary for each department.
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-E
Subject: COMPUTER SCIENCE (083) Max. Marks: 30

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

Answer the following sql queries:


a) Display the records whose name starts with ‘S’ and ends with ‘U’.
b) Display the average of Mark1 for each batch.
c) Display the records in descending order of date of admission.
d) Update the marks of Mark1 to 55 in place of NULL.

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)

2 Create a table name ELECTRONICS and insert the records with 4


following table:
TABLE: ELECTRONICS
BRAND APPLIANCE_NAME DISCOUNT PRICE QUANTITY
LG REFRIGERATOR 15 198.056 63
SAMSUNG SMART PHONE 20 223.472 26
LG AIR CONDITIONER 15 235.675 32
GODREJ WASHING MACHINE 18 189.896 48
SAMSUNG WASHING MACHINE 15 201.765 35

Answer the following sql queries:


a) Display all the appliances having ‘O’ in their name.
b) Display the records in the descending order of discount.
c) Display various appliances listed in the table Electronics.
d) Display total quantity of brand “LG”.

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

Answer the following sql queries:


a) Display all the record whose name is starting with either ‘B’ or
ending with ‘A’.
b) Display average salary of salesmen who are not getting bonus.
c) Display the various department code that are listed in the given
table.
d) Display the Maximum and Average salary for each department.
3 Report 7
4 Project 8
5 Viva 3
Total 30
Set-H
Subject: COMPUTER SCIENCE (083) Max. Marks: 30

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.

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

Answer the following sql queries:


a) Display the records whose name has ‘H’ as second last character.
b) Increase the marks of students by 5 marks who scored less than 75
in Mark1.
c) Display the name of the student who obtained highest marks for
the Mark1.
d) Display the number of students studying in each Batch.

3 Report 7
4 Project 8
5 Viva 3
Total 30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy