Practical List of Python For Class 12
Practical List of Python For Class 12
1. Write a python script to take input for a number check if the entered
number is Armstrong or not.
2. WAP to compute xn of given two integers x and n using Function.
3. Write a program to input the value of x and n and print the sum of the
following series using function:
1+x+x2+x3+x4+ ............xn
1-x+x2-x3+x4 + ......... xn
x + x2/2 + x3/3 + x4/3 + ...........+ xn
x + x2/2! + x3/3!+ x4/4! + ............ xn
x + x2/3! + x3/5! + x4/7! + ............ xn
4. Write a python program to evaluate factorial of a number by using
Recursive function.
5. Write a Program to Display the terms of a Fibonacci series using
Recursive Function.
6. Write a python program which take Input as string and determine whether
it is a palindrome or not.
7. Write a python script which takes Input as list of numbers and swap
Elements at the even location with the elements at the odd location.
8. Write a python script which takes Input as list of elements, Search
(Sequential) for a given element in the list.
9. Write a Recursive function in python BinarySearch(Arr,l,R,X) to search
the given element X to be searched from the List Arr having R
elements, where l represents lower bound and R represents the upper
bound.
10. Write a python script which takes Input as list of elements, arrange given
element in the list in ascending order using Bubble sorting.
11. Write a Python program to input names of „n‟ countries and their capital
and currency, store it in a dictionary and display in tabular form. Also
search and display for a particular country.
12. Write a python program to read a file named “story.txt”, count and print
total words starting with “a” or “A” in the file?
13. Write a python program to read a file named “article.txt”, count and print
total alphabets in the file?
14. Write a python program to read a file named “article.txt”, count and
15. Write a function in python to count the number of lines in a text file
„STORY.TXT‟ which is starting with an alphabet „A‟
16. Write a Python program to create a binary file with name and roll number.
Search for a given roll number and display the name, if not found display
Appropriate message.
17. A binary file “STUDENT.DAT” has structure (admission_number, Name,
Percentage). Write a function countrec() in Python that would read
contents of the file “STUDENT.DAT” and display the details of those
students whose percentage is above 75. Also display number of students
scoring above 75%.
18. Write a python program to maintain book details like book code, book title
and price using stacks data structures? (implement push(), pop() and
traverse() functions).
19. Write a python program to maintain employee details like empno,name
and salary using Queues data structure? (implement insert(), delete() and
traverse() functions)
20. Write a function to insert a record in table using python and MySQL
interface.
21. Write a function to display all the records stored in a table using
python and MySQL interface.
22. Write a function to search a record stored in a table using python and
MySQL interface.
SQL Questions:
Consider the following tables product and client. Further answer the questions given
below.
TABLE: PRODUCT