0% found this document useful (0 votes)
52 views

Computer Science 2

This document contains the practical file submitted by Aman Shukla of class 12th A of Venus Public School for the academic year 2021-2022. It includes 15 programming problems solved by Aman along with the source code and output for each problem. It is certified by his teacher Miss Sonam Sahu and the external examiner that the work is original. Aman thanks his teacher, principal, parents and friends for their support and guidance.

Uploaded by

Aman Shukla
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Computer Science 2

This document contains the practical file submitted by Aman Shukla of class 12th A of Venus Public School for the academic year 2021-2022. It includes 15 programming problems solved by Aman along with the source code and output for each problem. It is certified by his teacher Miss Sonam Sahu and the external examiner that the work is original. Aman thanks his teacher, principal, parents and friends for their support and guidance.

Uploaded by

Aman Shukla
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Venus Public School

Session:2021-2022
Practical File
Class: 12th ‘A’
Computer Science
Submitted to: Submitted
by:
Miss Sonam Sahu Aman Shukla

Teacher’s Signature External Examiner


Signature
Certificate
This is here to cetify that
original and genuine work has
been carried out to investigate
about the subject matter and
related data collection and
investigation has been
completed sincerely and
satisfactorily by Aman Shukla of class 12 ‘A’
th

of Venus Public School


regarding her activity.
Teacher’s Signature External Examiner
Signature

Ackn
owled
I gment
would like to express my
special thanks of gratitude to
my teacher Miss Sonam Sahu as well as
our principal Mrs Amrita Gupta who
gave me the golden opportunity
to do this wonderful, which also
helped me in doing a lot of
Research and i came to know
about so many new things I am
really thankful to them.
Secondly I would also like to
thank my parents and friends
who helped me a lot in finalizing
this project within the limited
time frame.
Teacher’s Signature External Examiner
Signature
Index
S. Programs Pag Teacher’s
No. e
Signature
No.
1 Read a text line by line and display each 1-1
word seperated by a #.

2 Read a text file and display the number of 2-3


vowels/consonants/lowercase characters in
the file.

3 Remove all the lines that contain the 3-4


character ‘a’ in a file and write it to another
file.

4 Create a binary file with name and roll 4-5


number.Search for a given name, if not
found display appropriate message.

5 Create a binary file with roll number, name 5-6


and marks. Input a number and update the
marks.

6 Write a random number generator that 6-6


generates random number between 1 and 6
(simulates a dice).

7 Create a CSV file by entering user-id and 7-7


password, read and searh the password for
given user-id.

8 Write a python program to check whether a 8-8


function is even or not.

9 Write a programe whether a given year is 9-9


leap year or not.

10 Write a python program to print number 10-


pyramid pattern. 10

11 Write a python program to sort the given 11- -

list. 11

12 Write a python program to sort a string. 12-


12

13 Write a python program to python program 13-


to print odd indexed elements in given list. 13

14 Write a program to convert temperature 14-


from celsius to fahrenheit. 14

15 Write a python program to check if a 15-


number is positive, negative, zero. 15
Teacher’s Signature External Examiner
Signature
1)Read a text file line by line and display each
word seperated by a #.
Source code:

Output:
2) Read a text file and display the number of the
vowels/consonants/
uppercase/lowercase characters im the file.
Source code:
Output:

3)Remove all the lines that contain the character


‘a’ in a line file and write it to another file.
Source code:

Before:
After:

4) Create a binary file with name and roll number.


Search for a given name and roll number and
display the name, if not found display appropriate
message.
Source code:
Output:

5) Create a binary file with roll numbe, name and


marks. Input a roll number and update the marks.
Source code:
Output:

6) Write a random number generator that generates


random numbers betweenb 1 and 6 (simulates a
dice).
Source Code:

Output:

7) Create a binaey file by entering user-id and


password, read and search the password for given
user-id.
Source code:
Output:

8) Write a python program to check whether a


function is even or not.
Source code:
Output:
9) Write a programe whether a given year is leap
year or not.
Source code:

Output:
10) Write a python program to print number
pyramid pattern.
Source code:

Output:
11) Write a python program to sort the given list.
Source code:

Output:
12) Write a python program to sort a string.
Source code:

Output:
13) Write a python program to python program to
print odd indexed elements in given list.
Source code:

Output:
14) Write a program to convert temperature from
celsius to fahrenheit.
Source code:

Output:
15) Write a python program to check if a number
is positive, negative, zero.
Source code:

Output:

You might also like