Class 12 Python assignments [ Practical File ]

Class 12 Python Practical File assignments is a suggestive list of Python questions that all class 12 computer science students must prepare for their practical file. These Python assignments are designed as per the CBSE guidelines for class 12 computer science students.

This whole assignment is divided into three parts. The first two parts are meant for record file and the third part is specially designed for project work. This assignment is suggestive you can take other questions based on this list of python questions.

Programming in Python [ Python 3.6 min )

  1. Write a Python program to implement a stack using a list data-structure.
  2. Write a python Program to implement Queue using a list data structure
  3. Write a function in Python to check the primarily of an integer number. Also implement this function in a Python Program.
  4. Write a function in Python to swap() first half of the elements with the second half of the elements. Also implement this function in a Python Program

Example:

List  = [1,2,3,4,5,6,7,8,9,10]

Result  = [ 6,7,8,9,10,1,2,3,4,5]

  1. Write a recursive function in Python to find the factorial of a natural number. Also implement this function in a Python Program.
  2. Write a recursive function in python to find out the sum of digits of any integer number. Also implement this function in a Python program.
  3. Write a recursive function to compute the nth Fibonacci number. Also implement this function in a Python Program.
  4. Write a recursive function in Python to find the sum of all elements of a list. Also implement this function in a Python Program
  5. Write a recursive Python program to test if a string is a palindrome or not.
  6. Write a Python Program to read a text file. Find out the total number of words available in this file.
  7. Write a program in Python to read a text file line by line and print it on the screen.
  8. Write a program in python to read a text file and remove all the lines that contain the character `a’ in a file and write it to another file.
  9. 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.
  10. Write a random number generator that generates random numbers between 1 and 6 (simulates a dice).
  11. Write a python program to generate a simple bar graph using Pyplot. The graph should be properly labeled.
  12. Write a python program to generate Pie-chart using Pyplot. The graph should be properly labeled.
  13. Write a Python program to plot the function y = x2 using the pyplot or matplotlib libraries.
  14. 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.
  15. Open a webpage using the urllib library.
  16. Compute EMIs for a loan using the numpy or scipy libraries.
  17. Take a sample of 10 phishing e-mails and find the most common words.

Data Management: SQL and web-server

  1. Find the min, max, sum, and average of the marks in a student marks table.
  2. Find the total number of customers from each country in the table (customer ID, customer
    name, country) using group by.
  3. Write a SQL query to order the (student ID, marks) table in descending order of the marks.
  4. Write a python program to insert a new row in a table in mysql .
  5. Write a python Program to delete a row from a mysql table.
  6. Write a program in Python to update a record in mysql table.
  7. Write a program in python to display the contents of a mysql table.
  8. Write a Django based web server to parse a user request (POST), and send an email using all this data.
  9. Write a Django based web server to parse a user request (POST), and write it to a CSV file.
    Python Project Guidelines

The aim of the class project is to create something that is tangible and useful. This should be done in
groups of 2 to 3 students, and should be started by students at least 6 months before the submission
deadline. The aim here is to find a real world problem that is worthwhile to solve.

Students are encouraged to visit local businesses and ask them about the problems that they are facing. For
example, if a business is finding it hard to create invoices for filing GST claims, then students can do a
project that takes the raw data (list of transactions), groups the transactions by category, accounts for
the GST tax rates, and creates invoices in the appropriate format. Students can be extremely creative
here. They can use a wide variety of Python libraries to create user friendly applications such as
games, software for their school, software for their disabled fellow students, and mobile applications,
Of course to do some of this projects, some additional learning is required; this should be
encouraged. Students should know how to teach themselves.

If three people work on a project for 6 months, at least 500 lines of code is expected. The committee
has also been made aware about the degree of plagiarism in such projects.

Teachers should take a very strict look at this situation, and take very strict disciplinary action against students who are cheating on lab assignments, or projects, or using pirated software to do the same. Everything that is
proposed can be achieved using absolutely free, and legitimate open source software.

Final thoughts on Python Practical File assignment for class 12

Most of the questions that appear in this assignment are already been solved and published on this website. You are requested to search the question if you are not able to understand or solve the question properly. We have not linked all these solutions so that you could try to solve it first. Good Luck.

Related Posts

If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to contribute@cbsetoday.com See your article appearing on the cbsetoday.com main page and help other students/teachers.