Beruflich Dokumente
Kultur Dokumente
CLASS XII
List of Programs for Practical File
Topic :Functions
Q 1) Write a random number generator that generates random numbers between 1 and 6
(simulates a dice).
Q 2) Write a Python function sin(x, n) to calculate the value of sin(x) using its Taylor series
expansion up to n terms. Compare the values of sin(x) for different values of n with the
correct value.
Q 3) Recursively find the factorial of a natural number.
Q 4) Write a recursive code to find the sum of all elements of a list.
Q 5) Write a recursive code to compute the nth Fibonacci number.
Q 6) Write a recursive Python program to test if a string is a palindrome or not.
Q 7) Write a recursive Python program to search a no using Binary search
Q 8) Write a function countdigit( ) to count the number of digits containing a file article.txt.
Q 9) Write a function countloser( ) to count the number of lower case characters containing a file
article.txt.
Q 10) Write a function countuser( ) to count the number of words starting with ‘a’ containing a
file article.txt.
Q 11) Read a file line by line and print it.
Q 12) Remove all the lines that contain the character `a' in a file and write it to another file.
Q 15) Write a Python program to plot the function y = x2 using the pyplot or matplotlib libraries.
Q 16) Create a graphical application that accepts user inputs, performs some operation on
them, and then writes the output on the screen. For example, write a small calculator. Use
the tkinter library.
Q 17) Open a webpage using the urllib library.
Q 18) Compute EMIs for a loan using the numpy or scipy libraries.
Q 19) Take a sample of 10 phishing e-mails and find the most common words.
Topic : SQL Table
Attributes:
Attributes:
Q 21) Integrate SQL with Python by importing the MySQL module to add doctor to the table
Doctors
Q 22) Integrate SQL with Python by importing the MySQL module to modify the joining date of a
doctor
Q 23) Integrate SQL with Python by importing the MySQL module to delete doctor with give
doctor_id
Q 24) Integrate SQL with Python by importing the MySQL module to display all the doctor in the
city ‘Mumbai’
Q 25) Integrate SQL with Python by importing the MySQL module to display the doctor with
maximum salary
Topic :Django
Q 26) Write a Django based web server to parse a user request (POST), and write it to a CSV
file.