21EC643
21EC643
21EC643
2022
Python Programming
Course Code 21EC643 CIE Marks 50
Teaching Hours/Week (L:T:P:S) 2:0:2:0 SEE Marks 50
Total Hours of Pedagogy 40 Total Marks 100
Credits 3 Exam Hours 3
Course objectives:
To learn programming using Python
Develop application using Python
19.09.2023
03.10.2022
Module-3
Pattern Matching with Regular Expressions, Finding Patterns of Text Without Regular Expressions,
Finding Patterns of Text with Regular Expressions, More Pattern Matching with Regular Expressions,,
The findall() Method, Character Classes, Making Your Own Character Classes, The Caret and Dollar Sign
Characters, The Wildcard Character, Review of Regex Symbols.
Reading and Writing Files, Files and File Paths, The os.path Module, The File Reading/Writing Process,
Saving Variables with the shelve Module, Saving Variables with the pprint. pformat() Function
Textbook 1: Chapters 7, 8
Teaching-Learning Chalk and talk method / PowerPoint Presentation
Process RBT Level: L1, L2, L3
Module-4
Classes and objects: Programmer-defined types, Attributes, Rectangles, Instances as return values,
Objects are mutable, Copying, Classes and functions: Time, Pure functions, Modifiers, Prototyping
versus planning, Classes and methods: Object-oriented features, Printing objects, Another example,
The init method, The__str__ method, Operator overloading, Type-based dispatch, Polymorphism.
Textbook 2: Textbook 2: Chapters 15 – 18
Teaching-Learning Chalk and talk method / PowerPoint Presentation
Process RBT Level: L1, L2, L3
Module-5
HTTP, The World’s simplest Web Browser, Retrieving an image over HTTP, Retrieving web pages with
urllib, Parsing html and scraping the web, Parsing HTML using RE, BeautifulSoup, Reading binary files
using urllib, XML, Parsing XML, Looping through nodes, JSON, Parsing JSON, API, geocoding Web
Service, Security & API usage, What is database?, Database Concepts, Database Browser, Creating a
database table, SQL, Spidering Twitter, Basic data modeling, Programming with multiple tables, Three
kinds of Keys, JOIN
Text book : Chapter 2, 13, 15
Teaching-Learning Chalk and talk method/Power point presentation
Process RBT Level: L1, L2, L3
Course outcomes (Course Skill Set)
At the end of the course the student will be able to:
1. To acquire programming skills in Python
2. To demonstrate data structure representation using Python
3. To develop the skill of pattern matching and files in Python
4. To acquire Object Oriented Skills in Python
5. To develop the ability to write database applications in Python
Assessment Details (both CIE and SEE)
The weightage of Continuous 5 End Examination) taken together.
19.09.2023
03.10.2022
19.09.2023
03.10.2022
Write python code to extract From: and To: Email Addresses from the given text file using regular
expressions. https://www.py4e.com/code3/mbox.txt.
Consider the sentence “From [email protected] Fri Jan 4 14:50:18 2008”, Write python code to
extract email address and time of the day from the given sentence
Write a program to read, display and count number of sentences of the given file.
Write a program that gets the current date and prints the day of the week.
Write a function called print_time that takes two Time objects and prints total time it in the form
hour:minute:second.
Write a program that takes a birthday as input and prints the user’s age and the number of days, hours,
minutes and seconds until their next birthday.
19.09.2023