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

Comp Sc.practical Revision List of Programs

The document outlines various Python programming exercises categorized into three sections: functions, text files, and binary files. It includes tasks such as checking for palindromes, reading and analyzing text files, and creating binary files with student data. Additionally, it describes implementing stack operations for managing employee information.

Uploaded by

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

Comp Sc.practical Revision List of Programs

The document outlines various Python programming exercises categorized into three sections: functions, text files, and binary files. It includes tasks such as checking for palindromes, reading and analyzing text files, and creating binary files with student data. Additionally, it describes implementing stack operations for managing employee information.

Uploaded by

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

List of Programs

Review of Python/ using functions

1. Check whether the entered number is a palindrome .


2. Check and display the number with the least one's digit number.
3. Python program to generate random number between 1 to 6 to simulate the dice.
4. Reverse an entered number.
5. Find the factorial of the entered number.
6. Find the sum of even and odd numbers separately in an entered list.

Text Files

1. To write a Python Program to Read a text file "Story.txt" line by line and display each word separated by
'#'.
2. To write a Python Program to read a text file "Story.txt" and displays the number of digits, alphabets
and special characters in the file.
3. To write a Python Program to read a text file "Story.txt" and displays the number of Vowels/
Consonants/ Lowercase / Uppercase/characters in the file.
4. Read the lines from poem.txt and display those words which are less than 5 characters.
5. To write a Python Program to display the lines starting with the letter "a" in the file Sample.txt.

Binary File

1. To write a Python Program to Create a binary file student.dat with roll number and name. Search for a
given roll number and display the name, if not found display appropriate message.
2. To write a Python Program to Create a binary file student.dat with name and marks. Display names of
the students who scored above 75, if not found display appropriate message.

Stack

Write a program in Python to implement the following operation on Stack containing (employee code and
name) as a list. Write functions for

1. PUSH

2. POP

3. DISPLAY

You might also like