1.
Write a program that reads a string and print its statistics like
No of Uppercase letters
No of Lowercase letters
No of alphabets
No of digits
Other Characters
2. Write a menu driven program in python which takes an integer number as
input and as per the user choice checks whether the number is Prime or a
Palindrome Number.
3. Write a program in python to display the given pattern.
1 2
1 2 3
1 2 3 4
1 2 3 4 5
4. Write a menu driven program in python to display Fibonacci Series of a
given number or a Factorial of a given number.
5. Write a program in python to read a list and sort the values of list without
using build in functions.
6. Write a python program to create a tuple storing the square of n natural
numbers.
7. Write a program to create a student dictionary containing the name(key) and
marks(value) of 5 students taken from the user. Also display the name of the
student whose marks is greater than 80. If not display appropriate message.
8. Write a user defined function SWAP2CHANGE() which takes list as
arguments in python to modify the content of the list in such a way that the
elements, which are multiples of 10 swap with the value present in the very next
position in the list. Invoke the function along with the list.
9. Write a function onedigit( ) that takes two numbers as input and
returns the number that has minimum one’s digit. Read the
numbers from the user and invoke the function . Also display the
number that is returned having minimum one’s digit.
10. Write a program in python using user defined functions
smallest() and largest() to find the smallest or largest among
three numbers. Read the numbers from the user and invoke
the function based on the user choice.
11. Write a menu driven program using user defined function
to perform all arithmetic operations based on their user
choice.
12. Write a program in python to write lines
We work, we try to be better
We work with full Zest
But, why is that we just don’t know any letter
in to the text file poem.txt. Also read the content of text file line by line and
display each word separated by #.
13. Write a python program to add a string “ An Aeroplane is in the Sky
12@#45 flying to @ Chennai” to the file article.txt Also read the content of the
file and count and display the number of alphabets, digits, uppercase letters,
lowercase letters, spaces and other characters present in the text file article .txt.
14. Write a program in python to create binary file employee.dat with 4 records
containing the following information employee no, employee name and salary.
Also read the content of the binary file and display all those employees whose
salary is above 25000 and also count and display the no of employees whose
salary is above 25000. If not found then display appropriate message
15. Write a function in python to update the starting point as Chennai, whose
destination is “Cochin” from binary file “Bus.Dat”. Assuming the binary file is
containing the following elements in the list:
1. Bus Number
2. Bus Starting Point
3. Bus Destination
Write a complete program to create a file bus.dat with 4 records and invoke the
function.
16.Write a program in python to create a csv file product.csv with 4 records
containing the information product id, product name, price. Also read the
content of the file and display all the records from product.csv whose price is
more than 300.