Course title Programming for Problem Solving using Python
Course Code: 25C1CSU-102
Scheme and Credits L T P C Semester – I/II
3 0 0 3
Pre-requisite (if any)
Internal Marks 40
External Marks 60
Total Marks 100
Course Outcomes:
At the end of this course, students will be able to
CO1 interpret the syntax and semantics of Python Programming Language.
apply Python functions for manipulating, indexing, and slicing of strings &
CO2
arrays and use of control statements in Python.
utilize the process of structuring the data using Python collections like strings,
CO3
lists, tuples, dictionaries.
apply user defined functions, modules, packages, exception handling methods
CO4
and file handing.
CO5
design and develop basic GUI applications in Python.
Detailed contents:
Unit – 1:- Basic Python’s Constructs (8 Lectures)
Introduction to Python Programming Language: Programming Language, History and
Origin of Python Language, Features of Python, Limitations, Major Applications of Python,
Getting, Installing Python, Setting up Path and Environment Variables, Running Python,
First Python Program, Python Interactive Help Feature, Python differences from other
languages. 3 Lectures
Python Data Types & Input/Output: Keywords, Identifiers, Python Statement,
Indentation, Documentation, Variables, Multiple Assignment, Understanding Data Type,
Data Type Conversion, Python Input and Output Functions, Import command.– 3 Lectures
Operators and Expressions: Operators in Python, Expressions, Precedence, Associativity
of Operators, Non Associative Operators.– 2 Lectures
Unit – 2 :- Control Statements and Native Data types in Python (10 Lectures)
Control Structures: Decision making statements, Python loops, Python control statements.
(5 lectures)
Python Native Data Types: Numbers, Lists, Tuples, Sets, Dictionary, Functions & Methods
of Dictionary, Strings (in detail with their methods and operations). – 5 Lectures
Unit 3 :- Functions and Modules in Python (12 Lectures)
Python Functions: Functions, Advantages of Functions, Built-in Functions, User defined
functions, Anonymous functions, Pass by value Vs. Pass by Reference, Recursion, Scope
and Lifetime of Variables. (4 Lectures)
Python Modules: Module definition, Need of modules, Creating a module, Importing
module, Path Searching of a Module, Module Reloading, Standard Modules, Python
Packages. (4 Lectures)
Python packages- Introduction, Writing python packages, using standard packages
(NumPy, matplotlib) and user defined package statements. (4 Lectures)
Unit 4 :- Exception Handling in Python (3 Lectures)
Exception Handling: Exceptions, Built-in exceptions, Exception handling, User defined exceptions
in Python.
Unit 5 :- File Processing (4 Lectures)
Concept of Files, File opening in various modes and closing of a file, Reading from a file, Writing
onto a file. (2 Lectures)
File handling functions e.g open(), close(), read(), readline(), write( ), tell ( ), seek ( ) methods.
Renaming & deleting files in Python, directories in Python. (2 Lectures)
Unit 6 :- Creating the GUI Form and Adding Widgets using Tkinter library: (8 Lectures)
Widgets: Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menubutton, Menu, Message,
Radiobutton, Scale, Scrollbar, text, Toplevel, Spinbox, PanedWindow, LabelFrame, tkMessagebox.
Handling Standard attributes and Properties of Widgets. (3 Lectures)
Layout Management: Designing GUI applications with proper Layout Management features (3
Lectures)
Look and Feel Customization: Enhancing Look and Feel of GUI using different appearances of
widgets. (2 Lectures)
Suggested Readings/Books:
1. Kenneth Lambert, “Fundamentals of Python: First Programs”, Cengage Learning, 2019
2. Martin C Brown, “ The Complete Reference with Python”, McGrawHill, 2018.
Suggested Reference Books
1. John Zelle, Python Programming: An Introduction to Computer Science, Franklin
Associates, Third Edition, 2016
2. Mark Lutz, “Learning Python”, Fifth Edition, O’Reilly, 2013.
3. Programming in Python, Pooja Sharma, BPB Publications, 2017.
4. Core Python Programming, R. Nageswara Rao, 2nd Edition, Dreamtech, 2021
5. Python in a Nutshell, A. Martelli, A. Ravenscroft, S. Holden, OREILLY., 2023