python

CONTENTS

  • Chapter No.

  • Title

  • Page No

    1. Introduction 01UNIT I

    2. Variables And Expression 13

    3. Conditional Statements, Looping, Control Statements 26

    4. Functions 42

    5. Strings 59UNIT II

    6. List 75

    7. Tuples And Dictionaries 88

    8. Files And Exceptions 112UNIT III

    9. Regular Expression 125

    10. Classes And Objects 134

    11. Multithreaded Programming 147

    12. Module 157UNIT V

    13. Creating The GUI Form And Adding Widgets 169

    14. Layout Management & Look & Feel Customization 192

    15. Storing Data In Our Mysql Database Via Our GUI 213

SYLLABUS

  • Course Name: Python Programming

  • Periods per week (1 Period is 50 minutes)

  • Semester I

  • Course Code: USIT301

  • Credits: 2

  • Hours: 75

UNIT I

1. Introduction:

  • The Python Programming Language

  • History

  • Features

  • Installing Python

  • Running Python program

  • Debugging

2. Variables and Expressions

  • Values and Types

  • Variables, Variable Names and Keywords

  • Type Conversion

  • Operators and Operands

  • Expressions

  • Interactive Mode and Script Mode

  • Order of Operations

3. Conditional Statements:

  • if, if-else, nested if-else

4. Looping:

  • for, while, nested loops

5. Control Statements:

  • Terminating loops, skipping specific conditions

UNIT II

6. Functions:

  • Function Calls, Type Conversion Functions, Math Functions

  • Composition, Adding New Functions, Definitions and Uses

  • Flow of Execution, Parameters and Arguments

7. Strings:

  • A String Is a Sequence

  • Traversal with a for Loop, String Slices

  • Strings Are Immutable, Searching

  • Looping and Counting, String Methods

  • The in Operator, String Comparison, String Operations

8. Lists:

  • Values and Accessing Elements

  • Lists are mutable, traversing a List

  • Deleting elements from List, Built-in List Operators

  • Concatenation, Repetition, In Operator

  • Built-in List functions and methods

UNIT III

9. Tuples and Dictionaries:

  • Tuples, Accessing values in Tuples

  • Tuple Assignment, Tuples as return values

  • Variable-length argument tuples, Basic tuples operations

  • Concatenation, Repetition, in Operator

  • Iteration, Built-in Tuple Functions

10. Creating a Dictionary:

  • Accessing Values in a dictionary

  • Updating Dictionary, Deleting Elements from Dictionary

  • Properties of Dictionary keys, Operations in Dictionary

  • Built-In Dictionary Functions, Built-in Dictionary Methods

UNIT IV

11. Regular Expression:

  • Concept of regular expression

  • Various types of regular expressions, using match function

12. Classes and Objects:

  • Overview of OOP, Class Definition

  • Creating Objects, Instances as Arguments,

  • Instances as return values, Built-in Class Attributes

13. Multithreaded Programming:

  • Thread Module, creating a thread, synchronizing threads

  • Multithreaded priority queue

14. Module:

  • Importing module, Creating and exploring modules

  • Math module, Random module, Time module

UNIT V

15. Creating The GUI Form And Adding Widgets:

  • Widgets, Layout Management, Look & Feel Customization

16. Storing Data In Our Mysql Database Via Our GUI:

  • Connecting to a MySQL database from Python

  • Configuring the MySQL connection, Designing the Python GUI database

  • Using the INSERT command, Using the UPDATE command

  • Using the DELETE command, Storing and retrieving data from MySQL database

OBJECTIVES

  • To understand the basics of python and its various applications.

  • To implement concepts of data structure using python.

  • To design GUI forms with widgets.

  • To work with databases via GUI application.

REFERENCES

  1. Think Python by Allen Downey, O'Reilly 1st Edition 2012

  2. Python Programming for Beginners By Prof. Rahul E. Borate, Dr. Sunil Khilari, Prof. Rahul S. Navale

  3. Exploring Python by Budd, TMH 1st Edition 2016

  4. Python GUI programming Cookbook - Burkahard A Meier, Packt Publication, 2nd Edition

  5. Python for Beginners by Shroff Publishers