Python Ap
Python Ap
Python Ap
For
“ PYTHON PROGRAMMING”
Presented by
A ANUSHA
Department of
CSE-Cyber Security
(2022-23)
ACADEMIC PLANNER
PYTHON PROGRAMMING
1 Preamble/Introduction 2
2 Prerequisites 2
3 Objectives and Outcomes 2
4 Syllabus 5
1.CMREC(8R)-B.TECH-CSE-CYBER SECURITY-R20(Autonomous)
SYLLABUS
2.GATE
5 List of Expert Details (Local/National/International with Contact 7
details/Profile link/Blogs/their research Contribution towards the
subject)
6 Journals with min 5 ref paper 7
7 Subject -Lesson plan 10
8 Suggested Books (prescribed and References) 11
9 Websites for self learning Resources like 12
www.geeksforgeeks.org,www.schools.com, Coursera ,edX, Udemy,
Khan Academy, NPTEL etc along Registration procedures
10 Question Banks 15
1.JNTUH-Model papers
2.GATE
11 Two case study presentations with Project / Product/ Model 17
/Prototypes/ Industrial applications.
12 Assignment Question/Innovative Assignments sets. 18
13 List of topics for students Seminars with Guidelines 19
14 STEP/Course material in softcopy 19
15 Expert Lectures with topics & Schedules(if any) 19
(1) COURSE INTRODUCTION TO PYTHON PROGRAMMING
Python is a popular programming language. It was created by Guido van Rossum and
released in 1991. Python works on different platforms (Windows, Mac, Linux, Raspberry
Pi, etc).It has a simple syntax similar to the English language. Python can be treated in a
procedural way, an object-oriented way or a functional way.It has syntax that allows
developers to write programs with fewer lines than some other programming languages.
Course Outcomes:
Examine Python syntax and semantics and be fluent in the use of
Python flow control and functions.
Demonstrate proficiency in handling Strings and File Systems.
Create, run and manipulate Python Programs using core data structures
like Lists, Dictionariesand use Regular Expressions.
Interpret the concepts of Object-Oriented Programming as used in Python.
Implement exemplary applications related to Network Programming, Web
Services andDatabases in Python
(3) PREREQUISITES:
UNIT – I
Python Basics, Objects- Python Objects, Standard Types, Other Built-in Types,
Internal Types, Standard Type Operators, Standard Type Built-in Functions,
Categorizing the Standard Types, Unsupported Types
Numbers - Introduction to Numbers, Integers, Floating Point Real Numbers,
Complex Numbers, Operators, Built-in Functions, Related Modules
Sequences - Strings, Lists, and Tuples, Mapping and Set Types
UNIT - II
FILES: File Objects, File Built-in Function [ open() ], File Built-in Methods, File
Built-in Attributes, Standard Files, Command-line Arguments, File System, File
Execution, Persistent Storage Modules, Related Modules
Exceptions: Exceptions in Python, Detecting and Handling Exceptions, Context
Management,
*Exceptions as Strings, Raising Exceptions, Assertions, Standard Exceptions,
*Creating Exceptions, Why Exceptions (Now)?, Why Exceptions at All?,
Exceptions and the sys Module, Related Modules Modules: Modules and Files,
Namespaces, Importing Modules, Importing Module Attributes, Module Built-in
Functions, Packages, Other Features of Modules
UNIT III
Regular Expressions: Introduction, Special Symbols and Characters, Res and Python
Multithreaded Programming: Introduction, Threads and Processes, Python,
Threads, and the Global Interpreter Lock, Thread Module, Threading Module,
Related Modules.
UNIT IV
UNIT V
Not applicable
.(5)EXPERT DETAILS
. EXPERT DETAILS
The Expert Details which have been mentioned below are only a few of the eminent
ones known Internationally, Nationally and Locally. There are a few others known
as well.
INTERNATIONAL
1. Ramez Elmasri,
Depart ment of Computer Science & Engineering,
College of Engineering,
The Universit y of Texas at Arlington, Arlington, USA.
2. C. Mohan,
IBM Fellow,
Almaden Research Center, San Jose, CA 95120, USA
3. Shankant B. Navathe,
College of Comput ing
Georgia Inst itute of Technology
801 At lant ic Dr., NW
At lanta, GA 30332-0280
NATIONAL
1. S. Sudarshan,
Dept. of CSE,
IIT, Bombay.
2. P. Sreenivasa Kumar
Dept of CSE,
IIT, Madras
REGIONAL
1. Kamalakar Karlapalem
Data Sciences and Analyt ics,
IIIT, Hyderabad.
2. Manish Singh
IIT, Hyderabad
(6) JOURNALS
INTERNATIONAL
1. https://www.researchgate.net/publication/269179027_The_Python_Project_A_Unique
_Model_for_Extending_Research_Opportunities_to_Undergraduate_Students
2. https://ieeexplore.ieee.org/abstract/document/9610674
3. https://iopscience.iop.org/article/10.1088/1742-6596/423/1/012027
NATIONAL
1. https://ijirt.org/ma ster/publishedpaper/IJIRT149340_PAPER.pdf
2. https://www.ijsr.net/archive/v8i2/ART20194929.pdf
(7)SUBJECT (LESSON) PLAN )
NO. OF
Suggest Teaching
S.NO Topic Sub-Topic LECTURES
ed Methods
REQUIRED
Books
UNIT – I
Introduction to Numbers, T1
5 L9,L10 M1
Integers, Floating
Point Real
Numbers
Complex Numbers, Operators, T1
6 L11,L12 M1
L17 T1,
9
R2 M1
UNIT- II
14 L24,25 T1 M4
Persistent Storage
15 Modules, Related Modules L26,L27 T1 M5
Exceptions in
16 L28,L29 T1 M1
Python,Detectin
g and Handling
Exceptions
Context Management, L30,L3
17 T1,R3 M5
*Exceptions as Strings, Raising 1
Exceptions,
Assertions, Standard Exceptions, L32,L3
18 *Creating Exceptions, Why T1,R3 M4
3
Exceptions (Now)?,
Why Exceptions at All?,Exceptions
and the sys Module, L34,L3
19
Related Modules 5
T1,R3 M5
20 Modules and Files, Namespaces L36,37 T1 M5
Importing Modules,
21 L38,L3 T1,R2 M4
Importing Module 9
Attributes
Module Built-in Functions,
22 L40,L4 T1 M4
Packages 1
UNIT -III
Introduction, Special
24 L43 T1 M4
Symbols and Characters,
Res and Python
Regular Expressions,
Multithreaded Introduction, Threads and
L44
Programming, Processes, Python T1 M4
UNIT-IV
UNIT-V
METHODS OF TEACHING:
8) SUGGESTED BOOKS
TEXT BOOKS
1. Core Python Programming, Wesley J. Chun, Second Edition, Pearson.
REFERENCE BOOKS
(9) WEBSITES
1) https://www.digimat.in/nptel/courses/video/106106182/L01.html
2)https://www.youtube.com/watch?v=c235EsGFcZs
3) https://www.w3schools.com/python/
4) https://www.javatpoint.com/python-basic-programs
5) https://www.guru99.com/python-tutorials.html
6) https://www.tutorialspoint.com/python/index.html
4. a) Explain with an example, how + and * operators work with strings. (6M)
b) Write a Python program that prints the intersection of two lists. (without (8M)
usinglist comprehension/sets)
5. a) What is lambda function? What are the characteristics of a lambda function? (7M)
Give an example.
b) Write a recursive Python function that recursively computes sum of (7M)
elementsin a list of lists.
Sample Input: [1, 2, [3,4], [5,6]] Expected Result: 21
6. a) What are different types of inheritance supported by Python? Explain. (8M)
b) What s the difference between else block and finally block in exception (6M)
handling? Explain with an example program.
7. a) Explain about Radiobutton widget in tkinter. How to create two radiobuttonsets (one for
gender and another for Indian or not) on the same canvas.
b) Write a Python program that creates two a demon threads and two non-daemonthreads.
Main thread should wait for all other threads to finish.
1. a) What Python uses, static typing or dynamic typing? Justify your answer with
(2M)
an example.
b) Write a for loop that prints numbers from 0 to 57, using range function. (2M)
c) Write a Python statement that swaps values of two variables. (only one (2M)
linestatement)
d) What is PIP. (2M)
e) How to create a destructor in Python? Give an example. (3M)
f) Write python script to print current date and time. (3M)
PART -B
3. a) What is the purpose of else clause for a loop? Explain how else works with (8M)
while and for loops, with examples.
b) Write a Python program that prints multiplication table of a given number. (6M)
4. a) What is a list in Python? How to create nested lists? Demonstrate how to (7M)
createand print a 3-dimensional matrix with lists.
b) Write a Python program that counts the number of occurrences of a letter in (7M)
astring, using dictionaries.
5. a) Python.
Explain about different types of arguments in
(8M)
b) Write a Python function that computes the harmonic sum of (6M)
n.Harmonic Sum = (1/2) + (1/4) + (1/8) + (1/16) + ….. + (1/2n)
1. a) What happens if a semicolon (;) is placed at the end of a Python statement? (2M)
b) What are membership operators? Give examples for usage. (3M)
c) What is a dictionary in Python? (2M)
d) Can a Python function return multiple values? If yes, how it works? (2M)
e) How to make a Python class member variable hidden from outside the class? (2M)
f) Write Python program to calculate your age in days. (days between (3M)
Today and Date of Birth)
PART -B
2. a) What are different applications of Python? Give examples. (6M)
b) Write a Python program to convert height in feet and inches (8M)
to cm. [1 feet = 12 inch and 1 inch= 2.54 cm]
(Sample input: 2 feet 7 inch Sample output: 78.74 cm)
4. a) Write a Python program that interchanges the first and last characters of (6M)
a given string.
b) Give a comparison between lists, tuples, dictionaries and sets. (8M)
5. a) What type of parameter passing is used in Python? Justify your (7M)
answer withsample programs.
b) Write a Python function that prints all factors of a given number. (7M)
ALL UNITS
Unit-I
Explain about the need for learning python programming and its importance.
Write in brief about the applications of Python.
Explain the basics for executing a python program using REPL(Shell) with an example.
Write a python program to read input using REPL(Shell) and display the output.
Write the rules for choosing names of variables.
Write in brief about any 5 keywords in Python.
Unit-II
Unit-III
Unit-IV
Unit-V
List the features and explain about different Object Oriented features supported byPython.
Explain the concept of method overriding with an example.
How to declare a constructor method in python? Explain.
Explain the feature of Inheritance in python with an example.
Differentiate between an error and exception.
How to create a user defined exception?
To create a Tkinter :
Importing the module – tkinter
Create the main window (container)
Add any number of widgets to the main window.
Apply the event Trigger on the widgets.
(12)Assignment Questions
UNIT-I
UNIT-II
1. Discuss about how to formatting the text output.
2. What are functions to use file input and file ouput.
3. Discuss briefly about defining and calling a void function.
4. Write a program to create, append, and remove lists inpython.
5. Write a program to demonstrate working with tuples inpython.
UNIT-III
1. Summarize the Accessing Characters and Substrings in a String
2. Classify how Testing, Searching, and Manipulating Strings
3. Identify how Finding Items in Lists with the in Operator
4. Discuss short notes on Two-Dimensional Lists
5. Summarize the Problem Solving with Recursion
UNIT-IV
1. Discuss short notes on Classes and Objects
2. Discuss short notes on Classes and Functions
3. Discuss short notes on Classes and Methods
4. Discuss short notes on Working with Instances
5. Discuss short notes on Inheritance and Polymorphism
UNIT-V
1. Summarize the Behavior of terminal based programs and GUI-based programs
2. Write a program by using the tkinter Module
3. Discuss short notes that how Display text with Label Widgets
4. Write a program by using Labels as Output Fields
5. Name the function of Colors and RBG System in python.
1. What are virtual environments, and how can you create a virtual environment by using the standard
Python library?
3. Describe generators in Python and give a brief example of how to use them
3. Related modules
4. Web server
ezyzip.zip
***THE END***
CMREC CSE-CSC
10