0% found this document useful (0 votes)
61 views35 pages

CS Practical File (1) (1)

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

CS Practical File (1) (1)

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

Session:-2024-25

SUBMITTED BY:- ORVASHYA KAILOO


CLASS:- 12th
ROLL NO.:-
SUBMITTED TO:- MR. ANKUR
SIR
CERTIFICATE

This is to certify that “Mannat


sharma” student of class – 12th
‘B’ , RollNo.-” “ has
successfully completed their
computer science practical file to
print and run different python and
SQL Examiner
Internal programs and functions Sign of under
Principal
the guidance of “Mr. Ankur
Gupta”.
External Examiner
AKNOWLEDGEMENT
I would like to express my special
thanks of gratitude to my computer
science teacher “Mr Ankur Gupta”
for their able guidance and support
in completing my practical file.
I would also like to extend my
gratitude to the principal “Mr
Ashwani” and vice principal Mam
“Miss Usha Gupta” for providing me
with all facility that was required.
INDEX
TOPICS
 1.To read a text file line by line and display each word separated by
a hash.
 2.To read a text file and display no. of vowels,
consonants,uppercase & lowercase
 characters
 3.Remove all the line containing A in a file and shift it into
another file.
 4.Create a binary file w name and rollno. Search a given
rollno. And display the name.
 5. Create a binary file w roll no & marks. Input a rollno. And
update the Marks.
 6.Write a Random number generator between 1-6 (DICE).
 7.Write a Program to implement stack using list.
 8.Write a program to create a csv file by entering user id .
 9.Write a program to print a pattern.
 10. Write a program to implement linear search.
 11.Write a program to implement bubble sort.
 12.Write a program to insert and delete operations of a queue data
structure.
 13.Write a program to implement reverse sort in the list.
 14.Write a program to use pop in stack.
 15.Write a program to make a number guessing game in python .
 16.Write a program to make the Rock , Paper and Scissor game in
python.
 17.Write a sql query to crate a table & insert Values
 Write a program to modify a datatype using ALTER in SQL.
 i.)To alter datatype in sql
 ii.)Write a Program to display data in descending order.
 iii.) Write a Program to add a column Named “Score” and add
values.
 iv.) To use max,min,sum &count.
 18. SQL command to aggregate with having clause.
 19.To use sql in python
 20.)Add_And_Display():To input details of a digital device(device No,
device Name, brand, price, stock Qty) and store it in the table
DIGITAL_DEVICES. The function should then retrieve and display all
records from the DIGITAL_DEVICES table where the price is greater
than 50000.
1. To read a txt file line by line a display each
word separated by a hash.
I NPUT AND OUTPUT:
2. To read a txt file and display no. of
vowels,consonants,uppercase & lowercase characters.

I NPUT:
OUTPUT:
3. Remove all the line containing A in a file and
shift
it to another file.
O UTPUT:
INPUT:
4. Create a binary file w name and rollno. Search a given
roll no & display the name, if not found display
appropriate message
INPU
T:


.
OUTPUT:
5. Create a binary file w roll no,name & marks.Input a roll
no
and update the marks.

I NPUT:
OUTPUT:
6. WRITE A RANDOM NO GENERATOR B/W 1-
6
(DICE)

INPUT AND OUTPUT:


7. WRITE A PROGRAME TO IMPLEMENT
STACK
USING LIST.

INPUT: OUTPUT:
8. create a csv file by entering user id and
password
read and search the password for given user id.

I NPUT:
OUTPUT:
9. Print the A
pattern: A B
A B C
A B
INPUT AND A
OUTPUT:
10. TO implement linear
search.

INPUT: OUTPUT:
11. To implement bubble sort.

I NPUT AND OUTPUT:


12. Write AddClient(Client) and DeleteClient(Client) methods in
python to add a new client and delete a client from a list client
name, considering them to act as insert and delete operations of
the Queue data structure.
INPUT: OUTPUT:
13. To implement reverse sort in
list.
I NPUT: OUTPUT:
14. Using pop in
stack.

I NPUT: OUTPUT:
15. Number guessing
game.

inpu output
t
16. ROCK,PAPER &
SCISSORS.

INPUT AND OUTPUT:


17. To create a table in SQL and insert
values.

INPUT : OUTPUT:
i.) To modify a datatype using ALTER.

INPUT: OUTPUT:
ii). TO DISPLAY DATA IN DESCENDING
ORDER.

INPUT & OUTPUT:

.
iii.) To add a column name score and add
values.

INPUT OUTPUT:
:
iv.) To use max,min,sum
&count.

INPUT & OUTPUT:


18. SQL command to aggregate with having
clause.

INPUT AND OUTPUT:


19. TO use sql in
python.

INSTALLATION :
USAGE


.

Usage:
 20.)Add_And_Display():To input details of a digital device(device No, device
Name, brand, price, stock Qty) and store it in the table DIGITAL_DEVICES. The
function should then retrieve and display all records from the DIGITAL_DEVICES
table where the price is greater than 50000.
 INPUT
OUTPUT
BIBLIOGRAPHY

For successfully completing my practical file .


I have taken the help from the followingsources:-

1.Computer Science with Python (Preeti Arora)


2.https://cbsepython.in

You might also like