B23-CAL-301 Programming using Python
Part A – Introduction | |||
Subject | BCA (Artificial Intelligence) | ||
Semester | III | ||
Name of the Course | Programming using Python | ||
Course Code | B23-CAL-301 | ||
Course Type: (CC/MCC/MDC/CC- M/DSEC/VOC/DSE/PC/AEC/
VAC) |
CC-A3 | ||
Level of the course (As per Annexure-I | 200-299 | ||
Pre-requisite for the course (if any) | N.A. | ||
Course Learning Outcomes(CLO): | After completing this course, the learner will be able to:
1. Understand the basic syntax and structure of Python programming. 2. Develop problem-solving skills using programming techniques. 3. Gain proficiency in writing, testing, and debugging Python programs. 4. Learn to work with data structures, modules, and libraries in Python. 5*. Apply Python programming to real-world scenarios and projects. |
||
Credits | Theory | Practical | Total |
3 | 1 | 4 | |
Contact Hours | 3 | 2 | 5 |
Max. Marks:100(70(T)+30(P))
Internal Assessment Marks:30(20(T)+10(P)) End Term Exam Marks: 70(50(T)+20(P)) |
Time: 3 Hrs.(T), 3Hrs.(P) | ||
Part B- Contents of the Course | |||
Instructions for Paper-Setter
The examiner will set a total of nine questions. Out of which the first question will be compulsory. The remaining eight questions will be set from four units selecting two questions from each unit. The examination will be of three-hour duration. All questions will carry equal marks. The first question will comprise short answer-type questions covering the entire syllabus. The candidate will have to attempt five questions in all, selecting one question from each unit. The first question will be compulsory. |
The practicum will be evaluated by an external and an internal examiner. Examination will be of three-hour duration. | ||
Unit | Topics | Contact Hours |
I | Introduction to Python: Python Overview and History, Features of Python, Difference Between C, JAVA & Python, Applications of Python, Programming Structure of Python, Python Environment Setup, Python Command Line mode and Python IDEs, Simple Python Program.
Python Basics: Identifiers, Keywords, Statements and Expressions, Variables, Operators, Precedence and Association, Data Types, Indentation, Comments, Built-in Functions- Console Input and Console Output, Type Conversions, Python Libraries, Importing Libraries with Examples. |
11 |
II | Python Control Flow: Types of Control Flow, Control Flow Statements- if, else, elif, while loop, break, continue statements, for loop Statements, range () and exit () functions.
Strings: Creating and Storing Strings, Accessing Sting Characters, the str() function, Operations on Strings- Concatenation, Comparison, Slicing and Joining, Traversing, Format Specifies, Escape Sequences, Raw and Unicode Strings, Python String Methods. Lists: Creating Lists, Operations on Lists, Built-in Functions on Lists, and Implementation of Stacks and Queues using Lists and nested Lists. |
11 |
III | Dictionaries: Creating Dictionaries; Operations on Dictionaries; Built-in Functions on Dictionaries; Dictionary Methods; Populating and Traversing Dictionaries.
Tuples and Sets: Creating Tuples; Operations on Tuples; Built-in Functions on Tuples; Tuple Methods; Creating Sets; Operations on Sets; Built-in Functions on Sets; Set Methods Exception Handling: Types of Errors; Exceptions; Exception Handling using try, except and finally. Python Functions: Types of Functions; Function Definition, Function Calling, Passing Parameters/arguments, the return statement; Default Parameters; Command line Arguments; Key-Word Arguments; Recursive Functions; Scope and Lifetime of Variables in Functions. |
12 |
IV | File Handling: File Types; Operations on Files– Create, Open, Read, Write, Close Files; File Names and Paths; Format Operator.
Object Oriented Programming: Classes and Objects; Creating Classes and Objects; Constructor Method; Classes with Multiple Objects; Objects as Arguments; Objects as Return Values; Inheritance- Single and Multiple Inheritance, Multilevel and Multipath Inheritance; Encapsulation- Definition, Private Instance Variables; Polymorphism- Definition, Operator Overloading. |
11 |
V* | Practicum:
Students are advised to do laboratory/practical practice not limited to but including the following types of problems: · Write a program that takes two integers as command line arguments and prints the sum of two integers. · Program to display the information: · Your name, Full Address, Mobile Number, College Name, Course Subjects · Program to find the largest number among ‘n’ given numbers. · Program to find the sum of all prime numbers between 1 and 1000. · Program that reads a set of integers and displays the first and second largest numbers. · Program to print the sum of first ‘n’ natural numbers. · Program to find the product of two matrices. · Program to find the roots of a quadratic equation · Write both recursive and non-recursive functions for the following: · To find the GCD of two integers · To find the factorial of the positive integer · To print the Fibonacci Sequence up to the given number ‘n’ · Program that accepts a string as an argument and returns the number of vowels and consonants the string contains. · Program that accepts two strings S1, S2, and finds whether they are equal are not. · Program to count the number of occurrences of characters in a given string. · Program to find whether a given string is palindrome or not. · Program with a function that takes two lists L1 and L2 containing integer numbers as parameters. The return value is a single list containing the pairwise sums of the numbers in L1 and L2. · Program to read the lists of numbers as L1, and print the lists in reverse order without using reverse function. · Write a program that combine lists L1 and L2 into a dictionary · Program to find all duplicates in the list. · Program to find all the unique elements of a list. · Program to find the max and min of a given tuple of integers. · Program to find union, intersection, difference, symmetric difference of given two sets. |
30 |
Suggested Evaluation Methods | ||
Internal Assessment:
➢ Theory · Class Participation: 5 · Seminar/presentation/assignment/quiz/class test etc.: 5 · Mid-Term Exam: 10 ➢ Practicum · Class Participation: NA |
End-Term Examination: A three-hour exam for both theory and practicum.
End Term Exam Marks: |
· Seminar/Demonstration/Viva-voce/Lab records etc.: 10
· Mid-Term Exam: NA |
70(50(T)+20(P
)) |
Part C-Learning Resources | |
Recommended Books/e-resources/LMS:
· Think Python How to Think Like a Computer Scientist, Allen Downey, et al., 2nd Edition, Green Tea Press. Freely available online @https://www.greenteapress.com/thinkpython/thinkCSpy.pdf. · Introduction to Python Programming, Gowrishankar S et al., CRC Press, 2019. · Core PYTHON Applications Programming, Wesley J. Chun, 3rd Edition, Prentice Hall, 2012. |