0% found this document useful (0 votes)
154 views

Csp0506 - Python Programming Updated

This document provides information about the course structure for a Programming Logics course that is part of a B.Tech. CSE program in the first semester from 2018-2022. It includes 4 units covering Python programming concepts like data types, operators, conditionals, loops, functions, modules, file handling, exceptions, regular expressions, object oriented programming and more. Students will be assessed through midterm and end term exams, assignments, projects and practical activities mapping to the 5 course outcomes. The course will involve both lectures and practical programming labs.

Uploaded by

Mahesh Kushwah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Csp0506 - Python Programming Updated

This document provides information about the course structure for a Programming Logics course that is part of a B.Tech. CSE program in the first semester from 2018-2022. It includes 4 units covering Python programming concepts like data types, operators, conditionals, loops, functions, modules, file handling, exceptions, regular expressions, object oriented programming and more. Students will be assessed through midterm and end term exams, assignments, projects and practical activities mapping to the 5 course outcomes. The course will involve both lectures and practical programming labs.

Uploaded by

Mahesh Kushwah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

COURSE STRUCTURE

Program B.Tech. CSE


Semester 1st Semester (2018-2022)
Course Code and Name CSP0101
Programming Logics
Credits 3
Contact Hours per week 6 (Lecture-0 Tutorial-0 Practical-6)

A. COURSE OUTCOMES

CO Remember: Recall the syntax and basic concepts of C programming. (BL1)


1
CO2 Understand: Explain the meaning of C programming constructs and how they work together .
(BL2)
CO Apply : Apply the various conditional and looping statement and functional programming.(BL3)
3
CO Analyzing: Analyze and evaluate C programming code to identify errors and optimize
4 performance. (BL4)
CO Evaluate : Evaluate the effectiveness of C programming solutions and propose improvements.
5 BL5)

B. ASSESSMENT TOOLS
S. Course Specific Assessment Tools CO’s Mapped BL
N
o.
1 Two Midterm Exams – 30 marks each. CO1-CO5 1-5
End Term Exam 40 marks of subjective
question.
2 Application Based Activity CO3,CO4,CO5 3-
5
3 ABCA-Assignment/seminar/Poster/Quiz CO1,CO2, CO3,CO4 2-4

4 Project /Workshop/Seminar CO3,CO4,CO5 3-


6
C. COURSE CONTENTS

Unit Contents Pedagogy

Unit-1 Introduction to Python programming No of Lectures with


Lecture:08 whiteboard/PPT,
Introduction, origin of Python, Downloading, Installing and Recorded
Running Python, Python Basics: Comment, Identifier, video/interactive
Indentations, Basic data types, conversions, operators, Build in videos,
functions. I/O Statements, Condition Statements & Loops: programming labs
If,
else, elif), conditional expressions, while, for, break continue
Unit – Data Structures in Python No of
2 Lecture:09 Lectures with
Lists: Introduction, Accessing list, Operations, Working with whiteboard/PPT,
lists, Tuple: Introduction, Accessing tuples, Operations, Recorded
video/interactive
Working with list, Dictionaries: Introduction, Accessing videos,
values in dictionaries, Working with dictionaries, Set: programming labs
Introduction ,Accessing set, Operations, Working with sets
Unit-3 Functions, Modules, File Handling No of Lecture:08
Functions: Defining a function, Calling a function, Types of Lectures with
whiteboard/PPT,
functions, Function Arguments, Anonymous function, Global
Recorded
and local variables, Recursion. video/interactive
Modules: Creating modules, Importing module, Packages, videos,
File programming labs
Handling :Opening and closing files, Reading and writing
files
Unit-4 Exceptional Handling, Regular Expressions
Lectures with
No of
whiteboard/PPT,
Lecture:10
Recorded
Exception Handling: Exception, Exception Handling, Try and video/interactive
Except clause, User Defined Exceptions, Exception handling videos,
in programming labs
files).
Regular Expressions: Introduction/motivation, special
symbols
and characters for REs , Match function, Search function.,
Matching VS Searching., Modifiers, Patterns.

Unit – Object Oriented Programming in Python


5 Lectures with
No of Lecture:08
whiteboard/PPT,
Introduction, OOPS Basics: Class and object, Constructors, Recorded
Need of Encapsulations, Attributes, default attributes, static
attributes, static methods, initializing objects, Pass by reference video/interactive
, videos,
self. Relational-ships: Introduction, Aggregation, programming labs
Dependency.
Inheritance: Need of Inheritance, Overriding, Super, Types of
Inheritance. Abstract Class, methods.
D. Text Book:
S. No. Author Title Publisher
1. Wesley J. Chun;; Core Python Prentice Hall.
Programming

E. Reference Books:
S. Author Title Publisher
No
.
1 Megnus Lie Hetland Beginning Python Apress.
from Novice to
Professional
2 Mark Lutz Programming Python rd
2 Edition,
O'Reilly
Media, Inc
3 Dusty Philips Python 3 Object Packt Publishing;
Oriented Programming July 2019

Steve Holden Python Web Programming New Riders


and David
Beazley

S.N Practical List


O.
1 Program to count the number of each vowel in a string.
2 Program to Find Sum of Natural Numbers Using Recursion.
3 Program To Display Powers of 2 Using Anonymous Function.
4 Program to Accept Three Digits and Print all Possible Combinations from
the Digits.
5 Program to Find the Sum of the Series: 1 + x^2/2 + x^3/3 + … x^n/n.
6 Program to Create a List of Tuples with the First Element as the Number
and Second Element as the Square of the Number.
7 Program to Count the Frequency of Words Appearing in a String
Using a Dictionary.
8 Program to Remove the Duplicate Items from a List.
9 Program that Displays which Letters are in the First String but not in the
Second
10 ARS Gems Store sells different varieties of gems to its customers. Write a
Python program to calculate the bill amount to be paid by a customer based
on the list of gems and quantity purchased. Any purchase with a total bill
amount above Rs.30000 is entitled for 5% discount. If any gem required by
the customer is not available in the store, then consider total bill amount to
be -1. Assume that quantity required by the customer for any gem will
always be greater than 0. Perform case-sensitive comparison wherever
applicable.
Hours
11 Given a list of integer values. Write a python program to check whether it
contains same number in adjacent position. Display the count of such
adjacent occurrences. 1.0 Hours

Sample Input Expected


Output
[1,1,5,100,-20,- 3
20,6,0,0]
[10,20,30,40,30,20] 0
[1,2,2,3,4,4,4,10] 3
12 Program to Count the Occurrences of a Word in a Text File.
13 Program to Read a File and Capitalize the First Letter of Every Word in
the File.
14 Program to Create a Class which Performs Basic Calculator Operations
15 Program to Find the Area of a Rectangle Using Classes

PBL.

1. A traveler on a visit to India is in need of some Indian Rupees (INR)


but he has money belonging to another currency. He wants to know
how much money he should provide in the currency he has, to get
the specified amount in INR. Write a python program to implement
a currency calculator which accepts the amount needed in INR and
the name of the currency which the traveler has. The program
should identify and display the amount the traveler should provide
in the currency he has, to get the specified amount in INR.
Note: Use the forex information provided in the table below for
the calculation. Consider that only the currency names mentioned
in the table are valid. For any invalid currency name, display -1.
Currency Equivalent of 1.00 INR
Euro 0.01417
British Pound 0.0100
Australian Dollar 0.02140
Canadian Dollar 0.02027
2. Food Corner home delivers vegetarian and non-vegetarian combos to
its customer based on order. A vegetarian combo costs Rs.120 per
plate and a non-vegetarian combo costs Rs.150 per plate. Their non-
veg combo is really famous that they get more orders for their non-
vegetarian combo than the vegetarian combo. Apart from the cost
per plate of food, customers are also charged for home delivery
based on the distance in kms from the restaurant to the delivery
point. The delivery charges are as mentioned below:

Given the type of food, quantity (no. of plates) and the distance in
kms from the restaurant to the delivery point, write a python
program to calculate the final bill amount to be paid by a customer.
The below information must be used to check the validity of the
data provided by the customer:
● Type of food must be ‘V’ for vegetarian and ‘N’ for
non- vegetarian.
● Distance in kms must be greater than 0.
● Quantity ordered should be minimum 1.
If any of the input is invalid, the bill amount should be considered as-
1.
3. The Metro Bank provides various types of loans such as car loans,
business loans and house loans to its account holders. Write a
python program to implement the following requirements:
● Initialize the following variables with appropriate input
values:account_number, account_balance, salary,
loan_type, loan_amount_expected and
customer_emi_expected.
● The account number should be of 4 digits and its first
digit should be 1.
● The customer should have a minimum balance of
Rupees 1 Lakh in the account.
● If the above rules are valid, determine the eligible loan amount
and the EMI that the bank can provide to its customers based
on
their salary and the loan type they expect to avail.
● The bank would provide the loan, only if the loan amount and the number of EMI’s re
the customer is less than or equal to the loan amount and the number of EMI’s dec
bank respectively.
Display appropriate error messages for all invalid data. If all the business rules are satisfied ,t
account number, eligible and requested loan amount and EMI’s.
Test your code by providing different values for the input variables.

No. of EMI’s required to repay


Salary Loan type Eligible loan
amount
> 25000 Car 500000 36
> 50000 House 6000000 60
> 75000 Business 7500000 84

You might also like