Theory 70 Marks
Practical 30 Marks
S.No | Unit Name | Marks(30 ) |
1. | Lab Test (10 marks) | |
Python program (60% logic + 20% documentation + 20% code quality) |
7 | |
Small Python program that sends a SQL query to a database and displays the result. A stub program can be provided. | 3 | |
2. | Report File + viva(9 marks) | |
Report file: Minimum 21 Python programs. Out of this at least 4 programs should send SQL commands to a database and retrieve the result; at least 1 program should implement the web server to write user data to a CSV file. | 7 | |
Viva voce based on the report file | 2 | |
3. | Project + viva (11 marks) | |
Project (that uses most of the concepts that have been learnt) | 8 | |
Project viva voce | 3 |
Some sample lab assignments are as follows:
5.1. Programming in Python:
- Recursively find the factorial of a natural number.
- Read a file line by line and print it.
- Remove all the lines that contain the character `a' in a file and write it to another file.
- 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.
- Write a random number generator that generates random numbers between 1 and 6(simulates a dice).
- Write a recursive code to find the sum of all elements of a list.
- Write a recursive code to compute the n th Fibonacci number.
- Write a Python program to implement a stack and queue using a list data-structure.
- Write a recursive Python program to test if a string is a palindrome or not.
- Write a Python program to plot the function y = x 2 using the pyplot or matplotlib libraries.
- 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.
- Open a webpage using the urllib library.
- Compute EMIs for a loan using the numpy or scipy libraries.
- Take a sample of 10 phishing e-mails and find the most common words.
5.2. Data Management: SQL and web-server
- Find the min, max, sum, and average of the marks in a student marks table.
- Find the total number of customers from each country in the table (customer ID, customer name, country) using group by.
- Write a SQL query to order the (student ID, marks) table in descending order of the marks.
- Integrate SQL with Python by importing the MySQL module
- Write a Django based web server to parse a user request (POST), and write it to a CSV file.
- Project
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.