MCA 106 Python Programming Notes from Unnati Educations run to 199 pages across 4 units, with 174 solved programs with output and 175 solved exam-style questions (133 short, 42 long). They follow the IPU MCA syllabus for affiliated institutes, applicable from Academic Session 2025-26, and the full notes come as a printed book.
Written by Prateek Talwar, Founder, Unnati Educations · Reviewed by Ritik Rawat, B.Tech, Senior Full Stack Developer · Checked against the MCA Scheme of Examination and Detailed Syllabus (BoS 28 Jul 2025) · Updated 13 October 2026 · Editorial policy
Scheme: MCA (2 years), USIC&T scheme for affiliated institutes | Applies to: Academic Session 2025-26 onwards | Verified against: MCA Scheme of Examination and Detailed Syllabus, ipu.ac.in (BoS 28 Jul 2025, AC 01 Aug 2025)
MCA 106 Python Programming at a glance: GGSIPU MCA Sem 2 credits, units and exam pattern
Printed as MCA-106, Python Programming is one of three compulsory Sem 2 theory papers, with MCA 102 and MCA 104. See all GGSIPU MCA Semester 2 papers.
| Code and title | MCA-106 Python Programming |
|---|---|
| Course and semester | MCA (2 years), Second Semester |
| Type and credits | Compulsory theory paper (not elective, not NUES) · L 3, T/P 0 · 3 credits |
| Marks | 100 (scheme pass-mark note); end-term paper 60; internal split not printed |
| Applies to | Affiliated institutes, Academic Session 2025-26 onwards |
| End-term pattern | Q1 compulsory, short answers from the whole syllabus, 12 marks; then one of two questions per unit, 12 marks each (12 + 48 = 60 marks) |
| Units | 4 (teaching hours 10, 11, 12, 12) |
| Paired lab | MCA-166 Python Programming Lab · L 0, T/P 2 · 1 credit |
Re-appear rules follow Ordinance 11 on ipu.ac.in, which governs the MCA programme.
MCA 106 Python Programming Notes unit-wise: 174 solved programs with output across 4 units
These MCA 106 Python Programming IPU notes keep each unit in syllabus order and close it with an Exam Corner and a Quick Revision Sheet. All 174 programs carry line numbers and real output, and 73 figures explain ideas like the LEGB rule. Notes for every other paper of the course sit under GGSIPU MCA notes. The sample PDF above shows a page from each unit.
MCA 106 Unit 1: Introduction, Control Flow, Functions and Modules
Pages 6 to 63. History, the REPL, data types and operator precedence lead into if/elif chains, loops and loop else. Functions run from formal and actual arguments to decorators, generators and recursion, then the math and random modules and packages. 53 programs, 15 figures, 33 short and 13 long solved questions.
| Function | Converts to | Example |
|---|---|---|
int(x) | Integer, decimals dropped | int(7.9) gives 7 |
int(x, base) | Integer from a string in a base | int('1010', 2) gives 10 |
float(x) | Floating-point number | float('3.5') gives 3.5 |
chr(n) / ord(c) | Character and Unicode code | chr(65) gives 'A' |
Quick look: type conversion functions (from page 21)
- Function
int(x)- Converts to
- Integer, decimals dropped
- Example
int(7.9)gives 7
- Function
int(x, base)- Converts to
- Integer from a string in a base
- Example
int('1010', 2)gives 10
- Function
float(x)- Converts to
- Floating-point number
- Example
float('3.5')gives 3.5
- Function
chr(n)/ord(c)- Converts to
- Character and Unicode code
- Example
chr(65)gives 'A'
MCA 106 Unit 2: Strings, Data Structures and File Handling
Pages 64 to 103. String slicing and immutability come first, then list methods, aliasing versus cloning, binary search, sorting and tuple return values. Dictionaries and sets follow, and file handling covers modes, with, formatted files and os functions. 43 programs, 12 figures, 31 short and 9 long solved questions.
| Operation | Operator | Method | Result |
|---|---|---|---|
| Union | A | B | A.union(B) | {1, 2, 3, 4, 5, 6} |
| Intersection | A & B | A.intersection(B) | {3, 4} |
| Difference | A - B | A.difference(B) | {1, 2} |
Quick look: set operations with A = {1, 2, 3, 4} and B = {3, 4, 5, 6} (from page 89)
- Operation
- Union
- Operator
A | B- Method
A.union(B)- Result
- {1, 2, 3, 4, 5, 6}
- Operation
- Intersection
- Operator
A & B- Method
A.intersection(B)- Result
- {3, 4}
- Operation
- Difference
- Operator
A - B- Method
A.difference(B)- Result
- {1, 2}
MCA 106 Unit 3: OOP, Threads and Exception Handling
Pages 104 to 144. Classes, constructors, static methods, name mangling, five types of inheritance, magic methods and abstract classes form the OOP chapter. Threads cover the life cycle and a race condition fixed with Lock and Semaphore. Exceptions go from the class hierarchy to finally, custom exceptions and assert. 36 programs, 13 figures, 33 short and 9 long solved questions.
Quick look: a Lock around a shared balance (from page 126)
lock = threading.Lock()
def deposit():
global balance
for _ in range(100):
with lock: # one thread at a time
temp = balance; balance = temp + 1With 5 threads the output is Balance with lock: 500.
MCA 106 Unit 4: Advanced Python, NumPy, Pandas, Matplotlib, Tkinter and Databases
Pages 145 to 199, the longest unit: lambda, comprehensions, NumPy arrays, Pandas DataFrames with missing values, Matplotlib charts and subplots, Tkinter widgets, menus and dialogs, and sqlite3 CRUD with joins, ending in a Tkinter form that saves to a database. 42 programs, 33 figures, 36 short and 11 long solved questions.
Quick look: map, filter and reduce on one list (from page 148)
from functools import reduce
nums = [1, 2, 3, 4, 5]
print(list(map(lambda x: x * x, nums))) # [1, 4, 9, 16, 25]
print(list(filter(lambda x: x % 2 == 0, nums))) # [2, 4]
print(reduce(lambda a, b: a + b, nums)) # 15Short-circuit vs lazy evaluation in Python: excerpt from page 22 of the MCA 106 notes
Excerpt from page 22 (Unit 1, section 1.16), rewritten for the web
Short-circuit evaluation
In a logical expression built with and or or, Python stops evaluating as soon as the final result is known. The remaining operands are not evaluated at all.
A and B: ifAis False, the result is already False, soBis never evaluated.A or B: ifAis True, the result is already True, soBis skipped.andandorreturn one of the operands, not necessarily True or False:0 or 'default'gives'default', and5 and 7gives7.
Lazy evaluation
Lazy evaluation is the broader strategy of computing a value only when it is actually needed, not when it is defined. In Python it shows up in generators, range(), map(), filter() and zip(). These produce items one at a time, on demand, instead of building the whole result in memory at once, which is why they stay light even on huge inputs.
| Short-circuit evaluation | Lazy evaluation |
|---|---|
Applies to the logical operators and, or and conditional expressions | Applies to iterators, generators, range, map, filter |
| Skips the remaining operand of one expression | Delays computing each value until it is requested |
| Purpose: speed and safety, such as avoiding division by zero | Purpose: saves memory and time, and allows infinite sequences |
Example: x != 0 and 10 / x > 1 | Example: range(10**12) uses almost no memory |
Short-circuit evaluation compared with lazy evaluation (page 22)
- Short-circuit evaluation
- Applies to the logical operators
and,orand conditional expressions - Lazy evaluation
- Applies to iterators, generators,
range,map,filter
- Short-circuit evaluation
- Skips the remaining operand of one expression
- Lazy evaluation
- Delays computing each value until it is requested
- Short-circuit evaluation
- Purpose: speed and safety, such as avoiding division by zero
- Lazy evaluation
- Purpose: saves memory and time, and allows infinite sequences
- Short-circuit evaluation
- Example:
x != 0 and 10 / x > 1 - Lazy evaluation
- Example:
range(10**12)uses almost no memory
The safe-division example is the one to remember. When x is 0, the left side x != 0 is already False, so Python never reaches 10 / x and no ZeroDivisionError is raised. Short-circuiting is really a special case of lazy evaluation: one works inside a single expression, the other across a whole sequence of values.
Do the MCA 106 notes cover the full GGSIPU syllabus?
Yes. Every official MCA-106 topic group, from command-line arguments to SQL joins, has its own section in the notes; no gap found.
| Official unit | Official topics | Where in the notes | Status |
|---|---|---|---|
| Unit I | Conceptual Introduction (history to command-line arguments, incl. short-circuit vs lazy evaluation); Control Flow | Ch. 1-2, pp. 7-34 | Covered |
| Unit I | Functions (arguments, scope, decorators, iterators, generators, recursion); Modules (math, random, packages, composition) | Ch. 3-4, pp. 35-56 | Covered |
| Unit II | String Manipulations; Data Structures (lists, tuples, dictionaries, searching and sorting, sets) | Ch. 1-3, pp. 65-90 | Covered |
| Unit II | File Handling (text files, formatted file, files and directories, closing files) | Ch. 4, pp. 91-97 | Covered |
| Unit III | Object Oriented Programming (constructors, data hiding, inheritance, polymorphism, operator overloading, abstract classes) | Ch. 1, pp. 105-120 | Covered |
| Unit III | Threads (life cycle, locks and semaphores); Exception Handling (hierarchy, finally, user-defined exceptions, assertions) | Ch. 2-3, pp. 121-138 | Covered |
| Unit IV | Advanced Python (lambda, comprehensions, map, reduce, filter); NumPy Library; Pandas Library | Ch. 1-3, pp. 146-168 | Covered |
| Unit IV | Data Visualization (Matplotlib); GUI Programming (Tkinter); Database Access (Create to Drop, Update, Joins) | Ch. 4-6, pp. 169-192 | Covered |
Official MCA-106 topic groups mapped to the notes
- Official unit
- Unit I
- Official topics
- Conceptual Introduction (history to command-line arguments, incl. short-circuit vs lazy evaluation); Control Flow
- Where in the notes
- Ch. 1-2, pp. 7-34
- Status
- Covered
- Official unit
- Unit I
- Official topics
- Functions (arguments, scope, decorators, iterators, generators, recursion); Modules (math, random, packages, composition)
- Where in the notes
- Ch. 3-4, pp. 35-56
- Status
- Covered
- Official unit
- Unit II
- Official topics
- String Manipulations; Data Structures (lists, tuples, dictionaries, searching and sorting, sets)
- Where in the notes
- Ch. 1-3, pp. 65-90
- Status
- Covered
- Official unit
- Unit II
- Official topics
- File Handling (text files, formatted file, files and directories, closing files)
- Where in the notes
- Ch. 4, pp. 91-97
- Status
- Covered
- Official unit
- Unit III
- Official topics
- Object Oriented Programming (constructors, data hiding, inheritance, polymorphism, operator overloading, abstract classes)
- Where in the notes
- Ch. 1, pp. 105-120
- Status
- Covered
- Official unit
- Unit III
- Official topics
- Threads (life cycle, locks and semaphores); Exception Handling (hierarchy, finally, user-defined exceptions, assertions)
- Where in the notes
- Ch. 2-3, pp. 121-138
- Status
- Covered
- Official unit
- Unit IV
- Official topics
- Advanced Python (lambda, comprehensions, map, reduce, filter); NumPy Library; Pandas Library
- Where in the notes
- Ch. 1-3, pp. 146-168
- Status
- Covered
- Official unit
- Unit IV
- Official topics
- Data Visualization (Matplotlib); GUI Programming (Tkinter); Database Access (Create to Drop, Update, Joins)
- Where in the notes
- Ch. 4-6, pp. 169-192
- Status
- Covered
Official source: MCA scheme of examination and syllabus, affiliated institutes, 2025-26 onwards.
The official PDF gives no unit titles, only Unit I to IV, so unit names here are the notes' own. Every course in GGSIPU notes is mapped to its official syllabus the same way.
How to write MCA 106 answers: definition-plus-syntax short answers and program-with-output long answers
The notes give two formats. A short answer is a definition plus one example or syntax line, in four to six lines. A long answer runs: definition, syntax, a diagram or flowchart, a program with output, then advantages or a comparison table.
Worked example: "Differentiate sort() and sorted()" (Unit 2 short answer)
list.sort() sorts the same list in place, returns None and works only on lists. sorted(iterable) returns a new sorted list, leaves the original unchanged and works on any iterable.
Mistakes the notes flag in program answers:
sys.argv[1] + sys.argv[2]with inputs 10 and 20 prints1020; arguments are strings, so convert withint().t.run()instead oft.start()runs the code in the main thread; no new thread starts.
For recursion, mark the base and recursive cases in comments and draw the call stack. Practise this format on GGSIPU MCA important questions.
MCA 106 exam corner: 133 short-answer and 42 long-answer solved questions by unit
| Unit | Short answers (printed "2.5 marks each") | Long answers (printed "12.5 marks") | Programs |
|---|---|---|---|
| Unit 1 | 33 | 13 | 53 |
| Unit 2 | 31 | 9 | 43 |
| Unit 3 | 33 | 9 | 36 |
| Unit 4 | 36 | 11 | 42 |
Solved questions and programs in the MCA 106 notes by unit
- Unit
- Unit 1
- Short answers (printed "2.5 marks each")
- 33
- Long answers (printed "12.5 marks")
- 13
- Programs
- 53
- Unit
- Unit 2
- Short answers (printed "2.5 marks each")
- 31
- Long answers (printed "12.5 marks")
- 9
- Programs
- 43
- Unit
- Unit 3
- Short answers (printed "2.5 marks each")
- 33
- Long answers (printed "12.5 marks")
- 9
- Programs
- 36
- Unit
- Unit 4
- Short answers (printed "2.5 marks each")
- 36
- Long answers (printed "12.5 marks")
- 11
- Programs
- 42
The printed labels follow an older pattern; under the 2025-26 scheme read them simply as "short" and "long".
- Unit 1: How is a generator different from a normal function? Pointer: it uses
yield, pauses after each value and keeps its state; a normal function returns once and ends. - Unit 2: Differentiate read(), readline() and readlines(). Pointer: whole file as one string, the next line, a list of all lines.
- Unit 3: Why is a generic
except Exceptionwritten last? Pointer: handlers are checked top to bottom, so placed first it hides every specific handler. - Unit 4: Differentiate DELETE and DROP. Pointer:
DELETEremoves rows and keeps the table;DROP TABLEremoves structure and data.
The MCA 106 notes solve 133 short-answer and 42 long-answer questions across 4 units, plus 174 programs with output.
More practice sits in the MCA 106 important questions.
Who writes and checks the MCA 106 Python notes?
- Prateek Talwar, author and editor. Founder, Unnati Educations; Associate Company Secretary (ACS), ICSI, membership no. 58704, since 15 May 2019; B.Com, University of Delhi (School of Open Learning), 2012. Author profile
- Ritik Rawat, subject reviewer for the Python code and outputs. Senior Full Stack Developer, Unnati Educations; B.Tech.
These GGSIPU MCA Sem 2 Python Programming notes are mapped to the USIC&T scheme for affiliated institutes from 2025-26 and were last updated on 13 October 2026. Our editorial policy explains how notes are checked. The same team prepares GGSIPU important questions for every course.
MCA 106 and the MCA 166 Python lab, plus other GGSIPU MCA Sem 2 papers
Paired lab: MCA 166 Python lab notes, a 1-credit practical (L 0, T/P 2) in the same semester.
The official MCA-166 course outcomes draw on the theory units like this:
- CO1, constructs and OOP: Unit 1 basics and Unit 3 classes.
- CO2, data structures and string functions: Unit 2.
- CO3, file and exception handling: Unit 2 files and Unit 3 exceptions.
- CO4 and CO5, data visualisation and GUI apps with a database: Unit 4 NumPy, Pandas, Matplotlib, Tkinter and
sqlite3.
Other Sem 2 papers: MCA 102 Data and File Structures and MCA 104 Object Oriented Software Engineering, one Core Elective I (MCA 108 to 126), one Open Elective I (MCA 128 to 134).
MCA 106 Python notes FAQs
How do I get the full MCA 106 notes?
The full MCA 106 notes are sold only as a printed book; they are not available as a PDF. Tap "Get Full Notes" or the button at the end of this page to open WhatsApp on 9899436384 and send the prefilled message. The book reaches you within 5 to 7 days at most, depending on your location.
Do the MCA 106 notes follow the 2025-26 MCA scheme?
Yes. They follow the MCA scheme of examination and detailed syllabus for affiliated institutes, approved by the USIC&T Board of Studies on 28 July 2025 and applicable from Academic Session 2025-26. Every official topic in Units I to IV maps to a section and page range in the notes, as the coverage table above shows clearly.
What is the passing mark for MCA 106?
MCA 106 is marked out of 100, and its end-term question paper carries 60 marks: a 12-mark compulsory Q1 plus four 12-mark unit questions. The MCA scheme of examination states passing marks as 40%, which is 40 out of 100, for every paper. The internal-assessment split is not printed there; end-term minimums and re-appear rules follow Ordinance 11.
Why do the MCA 106 notes print 2.5-mark and 12.5-mark labels?
The Exam Corner labels follow an older pattern. The 2025-26 MCA scheme sets Q1 at 12 marks in total and each unit question at 12 marks. The questions and answer formats still fit: a short answer stays a definition plus one example, and a long answer still runs from definition to a program with its output.
Which MCA 106 unit has the most programs?
Unit 1 has the most, with 53 of the 174 programs, because loops, functions, decorators, generators and recursion are all program-heavy topics. Unit 4 is the longest unit at 55 pages and has the most figures, 33 of 73, since Matplotlib charts and Tkinter windows are shown as images next to the code that draws them.
Is MCA 106 different from the MCA 166 Python lab?
Yes. MCA 106 is the 3-credit theory paper with a written end-term exam; MCA 166 is a separate 1-credit practical (L 0, T/P 2) in the same semester. The MCA 106 notes teach the concepts and programs for the written paper. The lab outcomes cover the same ground in practice, so these notes help with lab logic too.
Get the full MCA 106 Python Programming Notes on WhatsApp
The full notes are a printed book of 199 pages and are not available as a PDF. They are Python Programming notes in English, every program shown with its output.
Delivery: within 5 to 7 days at most; the exact time may vary with your location.
Order the MCA 106 notes book on WhatsApp (4 units, 199 pages)
Unnati Educations is an independent education provider based in Vikaspuri, Delhi. We are not affiliated with, authorised by, or endorsed by Guru Gobind Singh Indraprastha University (GGSIPU). 'GGSIPU' and 'IPU' are used only to describe the syllabus our notes follow. For official information, visit ipu.ac.in.
Ready for the full notes?
Discuss coverage and delivery with our team.