Professional Documents
Culture Documents
File Handling:
1. Program to read a file named “article.txt”, count and print total
alphabets in the file.
2. Program to read a file named “article.txt”, count and print various data.
3. Program to read a file named “story.txt”, count and print total words
starting with “a” or “A” in the file.
4. Program to read a file named “story.txt”, count and print total lines
starting with vowels in the file.
5. Function to remove all the lines that contain the character `a' in a file
and write it to another file.
6. Write a python program to read a file named “article.txt”,
count and print the following:
(i). length of the file(total characters in file)
(ii).total alphabets
(iii). total upper case alphabets
(iv). total lower case alphabets
(v). total digits
(vi). total spaces
(vii). total special characters
(viii). total no of vowels
Recursion:
1. Program to take input for a number and print its factorial using
recursion
2. Program to Display Fibonacci Sequence Using Recursion
3. Write a python script to take input for a number and print its
factorial using recursion?
Python-Mysql Interface:
1. Function to create a table in MySQL using python and MySQL interface.
2. Function to insert a record in table ‘Students’ using python and MySQL
interface.
3. Function to search a record stored in a table using python and MySQL
interface.
4. Function to display a record stored in a MySQL table according to the
user requirement (using python and MySQL interface).
Mysql:
1. Query to find the number, dealer, and price of the most expensive
article
2. Query to find the highest price per article.
3. For each article, find the dealer or dealers with the most expensive
price.
4. Query to calculate the number of days per month a user has visited a
Web page
Stacks:
1. Program to maintain book details like book code, book title and price
using stacks data structures (implement push(), pop() and traverse()
functions).
Queues:
1. Program to maintain employee details like empno,name and salary
using Queues data structure (implement insert(), delete() and traverse()
functions).
Binary Search:
1. Write a function to implement binary search to input a list and an
element, and return the index of the element in that list.
Sorting:
Submitted By:
Name-___________
Class - ______XII-F
Roll No.-__________
Teacher’s
S.No. Title of the Program
Sign
1. Write a program to check if a string is palindrome or not.
10. Write a program that returns the largest even number in the
list of integers.
14. Create a nested dictionary that stores the marks details along
with student names and then prints the
output.
16. From a data file, named story.txt, display the words starting
from “A”.
17. From the file data.txt, display the words which do not have
vowel.
19.
20.
21.
22.
23.
24.
25.
Sample Program (Formatting)
Input Code
def isPalindrome(str):
i = 0
j = len(str) - 1
while i < j:
if str[i] != str[j]:
return False
i = i + 1
j = j - 1
return True
if __name__ == '__main__':
str = "XYBYBYX"
if isPalindrome(str):
print("The String is Palindrome")
else:
print("The string is Not Palindrome")
Output Screen