Subject Code P11A2PP Subject Name Python Programming
Unit-1
Basics of PythonProgramming: History of Python, Python Features, Installation and Working with Python, Understanding Python variables, Python basic Operators, Understanding python blocks, Python data types, Declaring and using Numeric data types, using string data type and string operations, Defining list and list slicing, Use of Tuple data type. Python program flow control, Conditional blocks using if, else and elif, simple for loops, for loop using ranges, string, list and dictionaries, Use of while loops, Loop manipulation using pass, continue, break and else statement, Programming using Pythonconditional and loops block, Python - Date & Time.
Unit-2
Python Arrays, Functions, Modules and Packages: Python arrays, create an array, accessing array elements, looping array elements, adding and removing an array element, array methods. Creating a function, calling a function, passing parameters to function, how to define default value of parameters of a function, passing a list asa parameter, function returning a value, Recursive function, Lambda function.Creating and using module, built-in modules, importing own module as well as external modules, Understanding Packages, Programming using functions, modules and external packages
Unit-3
OOPS, Exception Handling, File Handling, Thread, Pytest and working with Device: Concept of class, object and instances, Constructor, class attributes and destructors,Inheritance, Adding and retrieving dynamic attributes of classes, Programming using Oops support and exception handling. Pytest, Threads & Locks, File Handling, Logging, Working with devices using paramiko ssh, telent, adb and serial.
Unit-4
Data Science and Data Visualization: Data Frame - Creating Data Frame from an Excel Spreadsheet, Creating Data Frame from.csv Files, Creating Data Frame from a Python Dictionary, Creating Data from Python List of Tuples, Operations on Data Frames,Bar Graph, Histogram, creating a Pie Chart, Stack chart, Creating Line Graph.
Advanced Books (in pdf):
1. Pythonand Tkinter Programming (Click)
2. Tkinter Quick Reference Guide (Click)
3. Tkinter GUI Programming by Example (Click)
4. Pandas for Beginners (Click)
Practical List:
1 Write a python program to exchange the values of two numbers without using a temporary variable.
2 Write a python program to read a number n and compute n+nn+nnn
3 Write a program to create menu for different arithmetic operations on numbers in python.
• Addition
• Subtraction
• Multiplication
• Division
Accepts users input and perform the operation accordingly.
4 Write a python program to find largest of three numbers.
5 Write a python program to count the number of digits in a number.
6 Write a python program to check whether given number is palindrome or not.
7 Write a python program to print prime number between m to n.
8 "Write a python program to take in the marks of 5 subjects and display total, percentage and grade.
The criteria for grade are as follow:
• If percentage is >90 then grade should be ‘A++’.
• If percentage is >80 and <89 then grade should be ‘A+’.
• If percentage is >70 and <79 then grade should be ‘A’.
• If percentage is >60 and <69 then grade should be ‘B’.
• If percentage is >50 and <69 then grade should be ‘C’.
• If percentage is <49 then grade should be ‘Good Luck’."
9 Write a python program to find factorial of a number using recursion.
10 Write a python program to construct the following pattern using nested for loop which depends on user input such as 5.
*
**
***
****
*****
****
***
**
*
11 Write a python program to find the second largest number in a list.
12 Write a python program to define a module to find Fibonacci Numbers and import the module to another program.
13 Write a python program to put even and odd elements in a list into two different lists.
14 Write a Python class to convert an integer to a roman numeral.
15 Write a Python class to implement pow(x, n).
16 Write a Python class to reverse a string word by word.
17 Write a Python program to calculate the average of numbers in a given list.
18 Write a Python program to read a list of words and return the length of the longest one.
19 Write a python program to create a list of tuples with the first element as the number and second element as the square of the number.
20 Write a python program to count the number of vowels and consonants in a string.
21 Write a python program to calculate the length of a string without using a library function.
22 Write a python program to store 100 numbers in to file.txt and check whether the number if Odd then store into odd.txt and Even number store into even.txt
23 Write a python program to implement a hybrid inheritance.
24 Write a python program to implement export and import list of tuples in or from data frame and generate Bar graph using that existing data.
25 Write a python program to implement export and import CSV in or from data frame and generate Pie Chart using that existing data.
26 Write a python program to implement export and import Excel in or from data frame and generate Line Graph using that existing data.
27 Write a python program to test any of the above programs using PyTest with its different parameters.
28 Write a python program to run any five commands of Linux through telnet using Paramiko library.