MCA-106
Python Programming
Python from the syntax up to NumPy, Pandas, Matplotlib, Tkinter and database connectivity.
- Semester
- Semester 2
- Credits
- 3
- Scheme
- 3 lectures a week
- Contact hours
- 45 across four units
- Category
- Core
What the paper is
Python Programming starts from nothing and finishes somewhere genuinely useful. The first two units are the language — control flow, functions, the built-in data structures, files — and the last two turn it into a working toolkit: objects and threads, then NumPy, Pandas, Matplotlib, a GUI in Tkinter and a database connection.
It is the lightest paper in the semester to pass and the most valuable to do properly, because the second half of it is the prerequisite for everything data-related later. Statistics and Data Analytics, Artificial Intelligence and Machine Learning, and Natural Language Processing in semester 3 all assume you can already load a DataFrame and plot the result.
The syllabus names its libraries explicitly, and that is a fair guide to the exam: array manipulation in NumPy, indexing and missing values in Pandas, and the specific chart types listed under data visualisation.
What to concentrate on
- Know the difference between the four built-in collections cold — list, tuple, dictionary, set — including mutability, ordering and when each is the right choice. It is the most frequently asked short question in the paper.
- Units III and IV carry twelve hours each and the heavier marks. Practise writing a small class with inheritance and operator overloading, and a short NumPy and Pandas sequence, rather than reading about them.
- Decorators, generators and list comprehensions look like optional syntax and are examined as core. They are also the topics most likely to appear as “explain with an example”, which is the cheapest kind of mark available here.
Syllabus, unit by unit
Summarised from the approved scheme. Hours are the contact hours the scheme allots, which is a fair guide to where the marks sit.
Unit I · Language fundamentals, control flow and functions
10 hours- History and features of Python, installation, the interactive shell, program structure, identifiers and keywords
- Escape sequences, data types, variables, assignment, immutable variables, operators and precedence
- Type conversion, short-circuit versus lazy evaluation, input and output functions, comments, command-line arguments
- Conditional statements and nested conditionals; for and while loops, break and continue
- Functions: definition and calling, arguments and return values, scope and lifetime, keyword and default arguments
- Decorators, iterators and generators, recursion; modules, the math and random modules, packages
Unit II · Strings, data structures and files
11 hours- String manipulation: basic functions, the subscript operator, indexing, slicing, immutability
- Lists: basic operations, slicing, methods, cloning, mutability, searching and sorting
- Tuples: assignment and use as return values; dictionaries: literals, adding and removing items, traversal, sorting, operations
- Set operations
- File handling: reading and writing text files, formatted files, manipulating files and directories, closing files
Unit III · Object orientation, threads and exceptions
12 hours- Classes and objects, attributes and methods, access specifiers, constructors, static methods, data hiding
- Inheritance, polymorphism, operator overloading, abstract classes
- Threads: multi-threading, the life cycle of a thread, synchronisation using locks and semaphores
- Exception handling: the exception class hierarchy, except, try and finally clauses, user-defined exceptions, assertions
Unit IV · NumPy, Pandas, visualisation, GUI and databases
12 hours- Lambdas and list comprehensions; map, reduce and filter
- NumPy: creating one-dimensional arrays, reshaping, element-wise and aggregate operations, indexing and slicing, inserting and appending, multi-dimensional arrays
- Pandas: data preparation and pre-processing, Series and DataFrames, indexing and loading, querying, missing values
- Data visualisation with Matplotlib: bar charts, pie charts, scatter plots, multiple plots, subplots, legends, figure size and styling
- GUI programming with Tkinter: widgets, layouts, check boxes, radio buttons, list boxes, menus, dialog boxes
- Database access: create, insert, select, delete, drop, update and joins
How it is examined
- Question 1 is compulsory, covers the whole syllabus, and is made of objective or short-answer questions. It carries 12 marks.
- The rest of the paper is four units matching the four above. Each unit sets two questions and you attempt one, so there are four more answers at 12 marks each.
- Examiners are asked to map every question to a course outcome using Bloom's taxonomy, which is why questions are phrased as “apply”, “analyse” or “evaluate” rather than only “explain”.
The pass mark is 40 out of 100 in every paper.
Learning objectives
- Mastering the fundamentals of writing Python scripts
- Understanding decision-making and functions in Python
- Interpreting object-oriented features in Python
- Gaining knowledge of data structures in Python
- Exploring GUI programming and database operations
Assumed beforehand
- Problem solving skills
Paired in the scheme with MCA-166 Python Programming Lab.
Books it is taught from
- TB1T. A. Budd, “Exploring Python”, McGraw-Hill Education, 1st edition, 2011
- TB2Mark Lutz, “Learning Python”, O'Reilly, 4th edition, 2013
- TB3Y. Daniel Liang, “Introduction to Programming Using Python”, Pearson, 1st edition, 2013
Notes for MCA-106
Lecture notes, question papers and assignments filed against MCA-106 are in the library. Everything there has been checked by a moderator before it appears, and an account is free — new ones are approved by hand, which is what keeps the shelf clean.