0% found this document useful (0 votes)
24 views31 pages

CLASS12CS

Uploaded by

rashmeet.kaur095
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)
24 views31 pages

CLASS12CS

Uploaded by

rashmeet.kaur095
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/ 31

SNEH INTERNATIONAL

SCHOOL

COMPUTER
SCIENCE
PRACTICAL FILE
SESSION 2024-2025
Submitted to- Ms. Muskan Khanna
Submitted by- Vansh Kumar

ACKNOWLEDGEMENT

I would like to express my special thanks or


gratitude to my computer science teacher
MS. MUSKAN KHANNA who gave me a
golden opportunity to do this practical work
and also provide support and guidance in
completing the file. I have learned a lot of
new things through this practical file.

Secondly I would also like to thank my


parents who helped me in finalizing the
practical file within a stipulated time frame!
CERTIFICATE

This is to certify that the practical file


reported here has been carried out
independently by Vansh Kumar 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
INDEX
S.n TOPICS

o
1 Write a program the percentage of a student and
display the grade accordingly
2 WAP to print the pattern.
3 Write a program that reads a string and then prints a
string that capitalizes every other letter in the string.
4 Write a program that reads a line(string),then counts
words and displays how many words are there in line.
5 Write a program to enter a stock by user and perform
functions on it.
6 Write a program to shift every element of a list to
circularly right, e.g., Input: [1,2,3,4,5,6,7] Output:
[4,5,6,1,2,3,7]
7 Write a program to input the total number of sections
and stream names in 11th class and display all
information on the output screen.
8 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.
9 Write a program to count number of records present in
“data.csv” file.
10 Write a program to copy the data from “data.csv”
to“temp.csv”
11 Write a python function that accepts a string and
calculates the number of uppercase letters and
lowercase letters.
12 Menu Driven
13 Write a program that fills a list with numbers.
14 Write a program to perform binary search using
randint ().
15 Write a method in Python to read lines from a text file
"MYNOTES.TXT" and display those lines which start with
the alphabet 'K'.
16 Write a program to count the number of upper-case
alphabets present in a text file “story.txt”.
17 Program to store and display multiple integers in
and from a binary file.
18 Create a database and table named student having
columns like rollno , name , gender , marks ,DOB .
19 Write a query to create a simple table countries
including columns country_id, country_name
20 Create a table named ‘HOTEL’ , and add delete
row of EMPID .
21 Consider the following two tables: Stationery and
Consumer, answer the following questions.
23 To add a new column ‘MARKS’ in STUDENTS table.
24 To check for the created tables using python .
25 To view the modified structure of students table
using python script.
26 To insert a record into the table student using
python
27 To implement where clause using python interface
in table Country.

Python
REPORT FILE
Q-1 Write a program for the percentage of a student and
display the grade accordingly.

Q2. Write a program to print the a pattern.


Q3.Write a program that reads a string and then prints a string
that capitalizes every other letter in the string.
Q-4 Write a program to interchange first and last elements in a
list.
Q-5 Write a program to enter a stock by user and perform
functions on it.
Q-6 Write a program to perform basic functions on stack.
Q-7Write a program to input the total number of
sections and stream names in 11th class and display all
information on the output screen.
Q-8 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.

Q-9 Write a program to count number of records present in


“data.csv” file.
Q-10 Write a program to copy the data from “data.csv”
to“temp.csv”
Q-11 Write a python function that accepts a string and
calculates the number of uppercase letters and lowercase
letters.
Q-12 Write a menu driven programto input no. and perform
operations.
Q-13 Write a program that fills a list with numbers.
Q-14 Write a program to perform binary search using randint
().

Q-15 Write a method in Python to read lines from a text file


"MYNOTES.TXT" and display those lines which start with the
alphabet 'K'.
Q-16 Write a program to count the number of upper-case
alphabets present in a text file “story.txt”.

Q-17 Program to store and display multiple integers in and from


a binary file.
SQ
L

Q-18 (i) Create a database and table named student having columns
like rollno , name .
(ii) Insert values in the table .

(iii) display details where marks are more than 95 .

(iv) Display where gender is male .


Q-19 (i) Write a query to create table countries including
columns country_id, country_name .

(ii) Add a column continent .

(iii) Show the type of table .

Q-20 Consider a table ‘HOTEL’ , and perform the given queries.


(i) Delete row of EMPID .
(ii) Display jobs which has salary less than 3lakhs.

(iii) Display the jobs with decreasing order salaries.


Q-21 Consider the following two tables: Stationery and
Consumer.
(i) To display details of all the Stationery Items in the Stationery table in
descending order of StockDate

(ii) To display details of that Stationery item whose Company is XYZ and
price is below 10.

(iii) To display ConsumerName, Address from the table Consumer and


Company and Price from Stationery table, with their corresponding
S_ID.

(iv) To increase the price of all the stationery items in Stationery table by
2.

v) SELECT COUNT (DISTINCT Address) FROM Consumer;


Q-22 Consider the following tables Product and Client. Write
SQL commands for the statements.
(i) To display the details of those Clients whose city is Delhi

(ii) To display the details of Products whose Price is in the range of 50


to 100 (both values included)

(iii) To display the details of those products whose name ends with
'Wash'.

(iv) SELECT DISTINCT City FROM CLIENT;


(v) SELECT Manufacturer, MAX (Price), MIN (Price), COUNT(*) FROM
PRODUCT GROUP BY Manufacturer.

Q-23 To add a new column ‘MARKS’ in STUDENTS table.


Q-24 To check for the created tables using python.
Q-25 To view the modified structure of students table using

python script.
Q-26 To insert a record into the table student using python
interface .
Q-27 To implement where clause using Python interface in
table .

You might also like