Atishay XD

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

SNEH INTERNATIONAL SCHOOL

COMPUTER SCIENCE
PRACTICAL FILE (23-34)

SUBMITTED BY:-Atishay Jain


Class :- 12A
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to Ms.
Muskan Khanna for her invaluable guidance and
support throughout the completion of my
computer science project. Her expertise,
patience, and insightful feedback were
instrumental in overcoming challenges and
enhancing the quality of my work. I deeply
appreciate the time and effort she dedicated to
helping me achieve my goals.
I would also like to extend my heartfelt thanks to
my parents for their unwavering support and
encouragement. Their belief in my abilities and
their constant motivation played a crucial role in
helping me stay focused and determined to
complete this project.
CERTIFICATE
This is to certify that the practical file reported
here has been carried out independently by
Atishay Jain of class XII under the guidance
of CS teacher MS. MUSKAN KHANNA for the
academic session of (2024-2025) regarding the
subject of Computer Science.

Signature:-
S.NO.
INDEX
TOPICS
1. WAP to print the pattern.

2. Write a program that reads a string and then prints a


string that capitalizes every other letter in the string.
3. Write a program to input the total number of sections
and stream names in 11th class and display all
information on the output screen.
4. Write a python program to input ‘n’ names and phone
numbers to store it in a dictionary and print the phone
number of a particular name.

5. Write a program to count the frequency of elements in


a tuple.
6. Write a program to print all the elements of a tuple in
the reverse order.

7. Write a python function that accepts a string and


calculates the number of uppercase letters and
lowercase letters.
8. Menu driven

9. Write a program that fills a list with numbers.

10. Write a program to perform binary search using randint


().

11. Write a function to calculate factorial of a given


number. The function should return the factorial using
return statement.
12. Write a function list change (Arr) in python, which
accepts a list of numbers and replaces each even
number by value 10 and multiply odd number by 5.
13. Program to store and display multiple integers in and
from a binary file.
14. Write a menu drive program to perform all built in
functions on string.
15. Write a menu driven program to perform all built in
functions on list.
16. Write a menu driven program to perform all built in
functions on tuple.
17. Write a menu driven program to perform all built in
functions on dictionary.
18. Write a program to create a Stack called Employee, to
perform the basic operations on Stack using list. The
list contains the two values-employee number and
employee name. The program should include the
options for addition, deletion and display of employee
details.
19. Write a program to implement a Stack for these book-
details (book no, book name). That is, now each item
node of the Stack contains two types of information - a
book no. and its name. Just implement PUSH display
operations.

20. Table:1
Q1. Display Pname, Quantity and rate for all the
orders that are either pencil or pen.
Q2. Display the orders which are not getting
any Discount
Q3. Display the Pname, Quantity and
Sale_date for all the orders whose total cost is
greater than 500.
Q4. Display the orders whose Rate is in the
range 20 to 100.
Q5. Display the minimum quantity, maximum
quantity and total quantity of orders.
25. Table:2
Q1. Display details of all PCs with stock more than
110.
Q2. Find the stock value of the BPL company
where stock value is the sum of the products of
price and stock.
Q3. List the company which gives warranty of
more than 2 years.
Q4. Count the number of products which shall
be out of warranty on 20-NOV2020.
Q5. Show the number of products from each
company.
26. Table:3
Q1. DisplayEqui Join of both tables
STUDENTS12 and FEES
Q2. Display Natural Join of the tables.
Q3. Display Cartesian Product for
STUDENTS12 × FEES.
Q4. Perform table aliases of STUDENTS12
Q5. Display Name and Class from the table
STUDENTS12 in descending order of Name.
27. Table:4
Q1. Display average of French marks.
Q2. Increase Maths marks of Roll No 4 by 10.
Q3. Delete the marks of all subjects of Ritu.
Q4. Display Science marks in ascending order.
Q5. Display Roll No and Name whose Hindi
marks are greater than 80.

28. Table:5
Q1. Display the names of students with grade
'C' in Game1 or Game2 or both.
Q2. Add a new column named 'Marks'.
Q3. Display the number of students getting
grade 'A' in Cricket.
Q4. Assign a value 200 for marks for all getting
grade 'B' or 'A' in Game1 and Game2.
Q5. Display the names of the students who have
the same game for both Game1 and Game2.

Q6. Display the game taken up by the students,


whose name starts with 'A'.
29. Q1- To check for created tables in database
using sql
30. Q2- to add a new column marks in student12 table
31. Q3- to insert record into the table student12
table.
32. Q4- To implement where clause in sports1
table.
33. Q5-To describe student12 table using python
FILE:-
Q1. Write a program to print the following pattern.
*
**
***
****
*****

CODE:-

OUTPUT:-
Q2. Write a program that reads a string and then prints a
string that capitalizes every other letter in the string.

CODE:-

OUTPUT:-
Q3. Write a program to input the total number of sections and
stream names in 11th class and display all information on the
output screen.

CODE:-

OUTPUT:-
Q4. Write a python program to input ‘n’ names and phone
numbers to store it in a dictionary and print the phone
number of a particular name.

CODE:-

OUTPUT:-
Q5. Write a program to count the frequency of elements ina
tuple.

CODE:-

OUTPUT:-
Q6.Write a program to print all the elements of a tuple in the
reverse order.

CODE:-

OUTPUT:-
Q7.Write a python function that accepts a string and calculates the
number of uppercase letters and lowercase letters.

CODE:-

OUTPUT:-
Q8.Menu driven

CODE:-

OUTPUT:-
Q9.Write a program that fills a list with numbers.

CODE:-
OUTPUT:-

Q10.Write a program to perform binary search using randint


().

CODE:-
OUTPUT:-
Q11.Write a function to calculate factorial of a given
number. The function should return the factorial
using return statement.

CODE:-

OUTPUT:-
Q12.Write a function listchange(Arr) in python,which
accepts a list of numbers and replace each even
number by value 10 and multiply odd number by 5.

CODE:-

OUTPUT:-
Q13.Program to store and display multiple
integers in and from a binary file.

CODE:-

OUTPUT:-
Q14. Write a menu drive program to perform all built in
functions on string.

CODE:-
OUTPUT:-
Q15. Write a menu drive program to perform all built in
functions on the list.

CODE:-
OUTPUT:-
Q16. Write a menu drive program to perform all built in
functions on tuple.

CODE:-
OUTPUT:-

Q17. Write a menu drive program to perform all built in


functions on dictionary.

CODE:-
OUTPUT:-
Q18. Write a program to create a Stack called
Employee, to perform the basic operations on Stack
using list. The list contains the two values-employee
number and employee name. The program should
include the options for addition, deletion and display of
employee details.

CODE:-

OUTPUT:-
Q19. Write a program to implement a Stack for these
book- details (book no, book name). That is, now each
item node of the Stack contains two types of
information - a book no. and its name. Just implement
PUSH display operations.

CODE:-
OUTPUT:-
Table1:-

Q1. Display Pname, Quantity and rate for all the orders
that are either pencil or pen.
Q2. Display the orders which are not getting any
Discount

Q3. Display the Pname, Quantity and Sale_date for all


the orders whose total cost is greater than 500.

Q4. Display the orders whose Rate is in the range 20


to 100.
Q5. Display the minimum quantity, maximum quantity
and total quantity of orders.

Table2:-
Q1. Display details of all PCs with stock more than 110.

Q2. Find the stock value of the BPL company where


stock value is the sum of the products of price and
stock.
Q3. List the company which gives warranty of more
than 2 years

Q4. Count the number of products which shall be out of


warranty on 20-NOV2020.

Q5. Show the number of products from each company.


Table3:-

Q1. DisplayEqui Join of both tables STUDENTS12 and


FEES
Q2. Display Natural Join of the tables.

Q3. Display Cartesian Product for STUDENTS12 ×


FEES.

Q4. Perform table aliases of STUDENTS12


Q5. Display Name and Class from the table
STUDENTS12 in descending order of Name.

Table4:-

Q1. Display average of French marks.


Q2. Increase Maths marks of Roll No 4 by 10.

Q3. Delete the marks of all subjects of Ritu.

Q4. Display Science marks in ascending order.


Q5. Display Roll No and Name whose Hindi marks are
greater than 80.

Table5:-

Q1. Display the names of students with grade 'C' in


Game1 or Game2 or both.
Q2. Add a new column named 'Marks'.

Q3. Display the number of students getting grade 'A' in


Cricket.

Q4. Assign a value 200 for marks for all getting grade
'B' or 'A' in Game1 and Game2.
Q5. Display the names of the students who have the
same game for both Game1 and Game2.

Q6. Display the game taken up by the students, whose


name starts with 'A'.
Table:-
Q1- To check for created tables in database using sql

Output:-
Table:-

Q2- to add a new column marks in student12 table

Output:-
Q3- to insert record into the table student12 table

Output:-
Table:-

Q4- To implement where clause in sports1 table

Output:-
Q5-To describe student12 table using python.

Output:-

You might also like