CS PracticalFile
CS PracticalFile
PRACTICAL FILE
for
SUBMITTED BY:
Name :
Class :
Section :
Roll No. :
Regd. No. :
He/She has taken interest and has shown at most sincerity in completion of this practical file
within the given date : ___ /___ / 2021.
The file is the result of his/her efforts and endeavours. This is found worthy of acceptance of
whatever he/she has gained knowledge of doing final practical file. His/Her work is
satisfactory and I wish him/her success in future.
I certify this Practical File up to my expectation and as per guidelines issued by
CBSE, NEW DELHI.
_____________________ ________________________
Teacher’s Signature External’s Signature
_________________________
The Principal’s Signature
Index
Sl Page
Source Codes of Programs & I/O Screens of Programs
No. No.
Write a program using function to calculate the factorial of a
1 1
number.
2 Read a text file line by line and display each word separated by a #. 2
Read a text file and display the number of
3 3
vowels/consonants/uppercase/lowercase characters in the file.
Write a program using user defined function to calculate the sum,
4 4
square and cubes of n natural numbers.
Remove all the lines that contain the character 'a' in a file and write
5 5
it to another file.
Write a program to get the roll numbers, names and marks of
6 students of a class and store these details in a file called 6
"Marks.txt".
Create a binary file with name and roll number. Search for a given
7 roll number and display the name, if not found display appropriate 7
message.
Create a binary file namely myfile.info and write a string having
8 8
two lines in it.
Write a program to open the file Emp.dat, read the objects written
9 9
in it and display them.
Create a binary file with roll number, name and marks. Input a roll
10 10
number and update the marks.
Write a random number generator that generates random numbers
11 12
between 1 and 6 (simulates a dice).
Write a method in python to read lines from a text file
12 "INDIA.TXT", to find and display the occurrence of the word 14
"INDIA".
Create a CSV file by entering user-id and password, read and
13 15
search the password for given user id.
Write a program to create a CSV file to store student data (Rollno,
14 Name, Marks). Obtain data from the user and write 5 records into 16
the file.
Write a program that copies a text file "source.txt" into "target.txt"
15 17
excluding the lines starting with "@".
Computer Science with Python (083)
Page No | 1
Computer Science with Python (083)
Page No | 2
Computer Science with Python (083)
Page No | 3
Computer Science with Python (083)
Page No | 4
Computer Science with Python (083)
Page No | 5
Computer Science with Python (083)
Page No | 6
Computer Science with Python (083)
Source Codes of Program 7:
Page No | 7
Computer Science with Python (083)
Page No | 8
Computer Science with Python (083)
Page No | 9
Computer Science with Python (083)
Page No | 10
Computer Science with Python (083)
Page No | 11
Computer Science with Python (083)
Page No | 12
Computer Science with Python (083)
I/O Screen of Program 11:
Page No | 13
Computer Science with Python (083)
Source Codes of Program 12:
Page No | 14
Computer Science with Python (083)
Source Codes of Program 13:
Page No | 15
Computer Science with Python (083)
Source Codes of Program 14:
Page No | 16
Computer Science with Python (083)
Source Codes of Program 15:
Page No | 17