The document contains a list of 30 programming problems related to Python. The problems cover topics like searching and manipulating lists and tuples, string processing, mathematical functions, file handling, SQL integration, stacks, and analyzing text. The problems are to be solved by writing Python programs that may include user-defined functions.
The document contains a list of 30 programming problems related to Python. The problems cover topics like searching and manipulating lists and tuples, string processing, mathematical functions, file handling, SQL integration, stacks, and analyzing text. The problems are to be solved by writing Python programs that may include user-defined functions.
The document contains a list of 30 programming problems related to Python. The problems cover topics like searching and manipulating lists and tuples, string processing, mathematical functions, file handling, SQL integration, stacks, and analyzing text. The problems are to be solved by writing Python programs that may include user-defined functions.
The document contains a list of 30 programming problems related to Python. The problems cover topics like searching and manipulating lists and tuples, string processing, mathematical functions, file handling, SQL integration, stacks, and analyzing text. The problems are to be solved by writing Python programs that may include user-defined functions.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 6
INDEX Name: Advaith S
S.NO PROGRAM Signature and
NAME Date
1. Write a python program to search an element in a
list and display the frequency of element present in list and their location using Linear search by using user defined function. [List and search element should be entered by user]
2. Write a python program to search an element in a
list and display the frequency of element present in list and their location using binary search by using user-defined function. [List and search element should be entered by user
3. Write a python program to pass list to a function
and double the odd values and half even values of a list and display list element after changing
4. Write a Python program input n numbers in tuple
and pass it to function to count how many even and odd numbers are entered. 5. Write a Python program to function with key and value, and update value at that key in dictionary entered by user
6. Wap to pass a string to a function and count how
many vowels present in the string.
7. Wap that generates random numbers between 1
and 6 using user defined function.
8. Wap to implement python mathematical functions.
9. Wap to implement python string functions.
10. Write a menu driven program in python to delete
name of a student from dictionary and to search phone no of a student by student name. Create menu as below: ****MENU****** 1.Delete from Dictionary 2.Search Phone number using name from Dictionary 3.Exit 11. Write a menu driven program in python to MENU 1.Reverse String 2.Check Whether string is Palindrome 3.Make half string in Uppercase 4.Exit
12. Write a menu driven program to generate random
numbers given in specific range and to display calendar after giving month and year.MENU 1.Generate Random Numbers 2.Calender of a month 3.Exit
13. Write a python program to read and display file
content line by line with each word separated by #
14. Write a python program to remove all the lines
that contain the character ‘a’ in a file and write it on another file
15. Write a Menu driven programme in python to
count spaces, digits,words and lines from text file try.txt
16. Write a python program to read characters from
one by one, all lowercase letters gets stored inside a file “LOWER”, all uppercase letters gets stored inside a file “UPPER”, and all other characters get stored inside “OTHERS”
17. Write a python program to create a binary file with
Name and roll number. Search for a given roll number and display name, if not found display appropriate message. 18. Write a python program to create a binary file with roll number, name and marks, input a roll number and update the marks.write a program ro create a binay
19. Write a python program to create a CSV file with
empid, update the record and display the records.
20. Write a menu driven python program to create a
CSV file by entering dept-id, name and city, read and search the record for given dept-id. MENU 1.Create csv 2.Search 3.Exit
21. Write a Python Program to create Lpush() and
Lpop() function to do push and pop operation using a list e.g. take a student information and push and pop the details.
22. Create a student table and insert data. Implement
the following SQL commands on the student table: ALTER table o add new attrbutes / modify data type / drop attribute UPDATE table to modify data ORDER By to display data in ascending / descending order DELETE to remove tuple(s) GROUP BY and find the min, max, sum, count and average
23. Integrate SQL with Python by importing the MYSQL
module record of employee and display the record.
24. Integrate SQL with python by importing the MYSQL
module to search an employee using empno and If present in table display the record, if not display appropriate method. 25. Integrate SQL with python by importing the MYSQL module to search a student using rollno, update the record.
26. Integrate SQL with Python by importing the MYSQL
module to search a student using rollno, delete the record.
27. Take a sample of ten phishing e-mails (or any text
file) and find most commonly occurring words(s)
28. Design a python program to implement following
stack operation using list: (i) Push Operation (ii) Pop Operation (iii) Peek Operation (iv) Display Stack (v) Exit
29. Write a python program using function PUSH(Arr),
where Arr is a list of numbers. From this list push all numbers divisible by 5 into a stack implemented by using a list. Display the stack if it has at least one element, otherwise display appropriate error message.
30. Write a python program using function POP(Arr),
where Arr is a stack implemented by a list of numbers. The function returns the value deleted from the stack.