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

Python Datastructures Course File

The document provides information on a Python Data Structures course offered at Hindustan Institute of Technology & Science. It includes the course code, credits, duration, prerequisites and instructor details. It outlines the vision, mission and objectives of the institute and computer science department. The course outcomes are mapped to program outcomes and program specific outcomes. The course delivery plan details the topics to be covered each week over the semester, the assessment methods and weightage. It provides the framework to ensure the course outcomes are effectively attained.

Uploaded by

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

Python Datastructures Course File

The document provides information on a Python Data Structures course offered at Hindustan Institute of Technology & Science. It includes the course code, credits, duration, prerequisites and instructor details. It outlines the vision, mission and objectives of the institute and computer science department. The course outcomes are mapped to program outcomes and program specific outcomes. The course delivery plan details the topics to be covered each week over the semester, the assessment methods and weightage. It provides the framework to ensure the course outcomes are effectively attained.

Uploaded by

Renjith
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

SCHOOL OF COMPUTING SCIENCES

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

COURSE FILE

CSD4386 PYTHON DATA STRUCTURES (Coursera)

Academic Year: 2020-21 (Odd Sem) Department: NE


Programme: B.Tech Semester: V
Course Title: Python Data Structures Course Code: CSD4386
Course Category: Non Engineering Elective Total Duration (Hrs): 45
Prerequisite: Basic programming knowledge Credits: 2

INSTRUCTOR

Dr.Renjith P N
Associate Professor
Department of Computer Science and Engineering
Hindustan Institute of Technology & Science
INDEX

S.No. Contents
1 Vision, Mission of the Institutety and Department
2 Programme Educational Objectives (PEOs), Programme Outcomes
(POs) and Programme Specific Outcomes (PSOs)
3 Course Outcomes (Cos) with POs and mapping

4 Course Delivery Plan (CDP)


5 Course Assessment Plan (CAP)
6 Question Bank
7 Class Nominal Roll
8 Course Materials
9 Assignments Questions with Samples
10 Continuous Internal Assessment (CIA) Question Papers with Sample
answer books
11 Result Analysis
12 Course Outcome Attainment

13 Course Exit survey


14 Innovative teaching practices in TLP
15 Points of appreciation and novelty

16 Continuous Quality Improvement report (CQI)


VISION, MISSION OF THE ISTITUTE

VISION

To Make Every Man a Success and No Man a Failure.

MISSION

• To create an ecosystem that promotes learning and world class research.


• To nurture creativity and innovation.
• To instill highest ethical standards and values.
• To pursue activities for the development of the Society.
• To develop national and international collaborations with institutes and
industries of eminence.
• To enable graduates to become future leaders and innovators.
Value Statement
• Integrity, Innovation, Internationalization

DEPARTMENT VISION AND MISSION


VISION
To excel in Computer Science and Engineering education, research and project
management by empowering the students with strong conceptual knowledge.
MISSION
M1. To educate the students with basic foundation blocks of core and allied
disciplines of
Computer Science and Engineering.
M2. To provide practical skills in the advancements of the Computer Science and
Engineering field required for the growing dynamic IT and ITES industries.
M3. To sculpt strong personal, technical, research, entrepreneurial, and leadership
skills.
M4. To inculcate knowledge in lifelong learning, professional ethics and
contribution to the
society.

PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

PEO1. Excel in his/her professional career and/or pursue higher education including research by applying
the knowledge of Computer Science and Engineering.
PEO2. Demonstrate the technical skills to analyze and design appropriate solutions for problems with
social consciousness and ethical values.
PEO3. Adapt themselves to organizational needs by understanding the dynamically changing technologies.

PROGRAMME OUTCOMES (POs)

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering problems.
2. Problem analysis: Identify, formulate, research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of the
information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with
an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering solutions
in societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms
of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive
clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s own work, as a member and leader in a team,
to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.

PROGRAMME SPECIFIC OUTCOMES (PSOs)

PSO1. To impart the basic knowledge and conceptual understanding of Computing through
mathematical and analytical skills.
PSO2. To develop the skill set of the students in the domains of cyber physical Systems, Algorithm
design Techniques and Enterprise systems security
PSO3. To inculcate the analytical knowledge of the students for innovative system design using
modern tools and techniques.
Document Sl. No: IQACB01 Review Period: Every Semester Validation authority: IQAC
COURSE DELIVERY PLAN
(This document is to be presented to the students during the first week of commencement of
classes and send a soft copy to every student of the class by the course instructor)

Academic Year: 2020-21 (Odd Sem) Department: NE


Programme: B.Tech Semester: V
Course Title: Python Data Structures Course Code:
CSD4386
Course Category: Non Engineering Elective Total Duration
(Hrs): 45
Prerequisite: Basic programming knowledge Credits: 2
Instructor (s): Dr. Renjith P N

Courseware Home Page:


COURSE OUTCOMES (COs) WITH PO AND PSO MAPPING
The Bloom’s Taxonomy is to be followed in curriculum development, courseware
development, planning and delivery of contents, Assessment, Mapping, Data Analysis and CQI
(Continuous Quality Improvement)
COURSE OUTCOMES (CO) Attainment
BTL Threshold
(%)
The student should be able to

BTL-
CO - 1 Identify and execute basic syntax and programs in Python. 80
3
BTL-
CO - 2 Implement file operation and processing files using python. 70
4
BTL-
CO - 3 Solve problems using Python list and their methods. 80
5
Work with Dictionaries and execute programs using BTL-
CO - 4 80
Dictionary. 6
BTL-
CO – 5 Implement Tuples and Programs based on Tuples 75
6

MAPPING OF COs with POs and PSOs

PROGRAMME OUTCOMES (PO) PSO


COURSE
S. No

PO 11
PO10

PO12

PSO1
PSO2
PSO3
OUTCOMES (CO)
PO 7
PO 8
PO1

PO2

PO3

PO4

PO5
PO6

PO9

1 CO-1 3 3 2 3 3 2 2 2 1 1 2 3 3 3 3

2 CO-2 3 3 3 2 3 3 2 2 2 1 2 1 3 3 3

3 CO-3 3 3 3 3 3 3 3 3 3 1 1 2 3 3 3

4 CO-4 3 3 3 3 3 3 3 3 2 1 2 3 3 3 3

5 CO-5 3 3 3 3 3 3 3 3 2 2 3 3 3 3 3

1 - Slight (Low) 2 - Moderate (Medium) 3 - Substantial (High)


Justification of the mapping:

CSB4231. Apply practical knowledge to write basic program using Python strengthen Engineering
1 knowledge (PO1), and this in turn helps in analyzing and solving problems (PO2) and
designing and developing solutions to complex engineering problems (PO3). It uses the
research based knowledge to investigate complex problems (PO4), insists in modern tool usage
(PO5), contextual knowledge to assess through Engg. Society (PO6), societal and
environmental contexts, and demonstrate the knowledge of, and need for sustainable
development (PO7), Apply ethical principles (PO8), Individual and team work (PO9),
Communicate effectively on complex engineering activities (PO10), Demonstrate knowledge
and understanding of the engineering and management principles (PO11) and ability to engage
in independent and life-long learning in the context of technological change (PO12). It
improves the ability to analyze basic concepts (PSO1) and helps in developing software
solution to varying complex problems (PSO2) and applies computing and innovative idea using
modern tools and techniques (PSO3).

CSB4231. Implement file operation and processing files to create applications to strengthen
2 Engineering knowledge (PO1), and this in turn helps in analyzing and solving problems (PO2)
and designing and developing solutions to complex engineering problems (PO3). It uses the
research based knowledge to investigate complex problems (PO4), insists in modern tool usage
(PO5), contextual knowledge to assess through Engg. Society (PO6), societal and
environmental contexts, and demonstrate the knowledge of, and need for sustainable
development (PO7), Apply ethical principles (PO8), Individual and team work (PO9),
Communicate effectively on complex engineering activities (PO10), Demonstrate knowledge
and understanding of the engineering and management principles (PO11) and ability to engage
in independent and life-long learning in the context of technological change (PO12). It
improves the ability to analyze basic concepts (PSO1) and helps in developing software
solution to varying complex problems (PSO2) and applies computing and innovative idea using
modern tools and techniques (PSO3).
CSB4231. Implement Solution to problems using Python list and their methods helps to strengthen
3 Engineering knowledge (PO1), and this in turn helps in analyzing and solving problems (PO2)
and designing and developing solutions to complex engineering problems (PO3). It uses the
research based knowledge to investigate complex problems (PO4), insists in modern tool usage
(PO5), contextual knowledge to assess through Engg. Society (PO6), societal and
environmental contexts, and demonstrate the knowledge of, and need for sustainable
development (PO7), Apply ethical principles (PO8), Individual and team work (PO9),
Communicate effectively on complex engineering activities (PO10), Demonstrate knowledge
and understanding of the engineering and management principles (PO11) and ability to engage
in independent and life-long learning in the context of technological change (PO12). It
improves the ability to analyze basic concepts (PSO1) and helps in developing software
solution to varying complex problems (PSO2) and applies computing and innovative idea using
modern tools and techniques (PSO3).
CSB4231. Work with Dictionaries and execute programs using Dictionary will support strengthen
4 Engineering knowledge (PO1), and this in turn helps in analyzing and solving problems (PO2)
and designing and developing solutions to complex engineering problems (PO3). It uses the
research based knowledge to investigate complex problems (PO4), insists in modern tool usage
(PO5), contextual knowledge to assess through Engg. Society (PO6), societal and
environmental contexts, and demonstrate the knowledge of, and need for sustainable
development (PO7), Apply ethical principles (PO8), Individual and team work (PO9),
Communicate effectively on complex engineering activities (PO10), Demonstrate knowledge
and understanding of the engineering and management principles (PO11) and ability to engage
in independent and life-long learning in the context of technological change (PO12). It
improves the ability to analyze basic concepts (PSO1) and helps in developing software
solution to varying complex problems (PSO2) and applies computing and innovative idea using
modern tools and techniques (PSO3).
CSB4231. Implement Tuples and execute programs based on Tuples to strengthen Engineering
5 knowledge (PO1), and this in turn helps in analyzing and solving problems (PO2) and
designing and developing solutions to complex engineering problems (PO3). It uses the
research based knowledge to investigate complex problems (PO4), insists in modern tool usage
(PO5), contextual knowledge to assess through Engg. Society (PO6), societal and
environmental contexts, and demonstrate the knowledge of, and need for sustainable
development (PO7), Apply ethical principles (PO8), Individual and team work (PO9),
Communicate effectively on complex engineering activities (PO10), Demonstrate knowledge
and understanding of the engineering and management principles (PO11) and ability to engage
in independent and life-long learning in the context of technological change (PO12). It
improves the ability to analyze basic concepts (PSO1) and helps in developing software
solution to varying complex problems (PSO2) and applies computing and innovative idea using
modern tools and techniques (PSO3).
COURSE DELIVERY PLAN

Hrs Pertaining CO & Assessment Method for


S.No Topic / Session topic
BTL TLO
1. 1Basic Python programs Program and output
by reading input from 2 CO-1 & BTL-3 verification
console.
2. 2Working with Strings and Program and output
creating program based on 2 CO-1 & BTL-3 verification
string
3. 3Execute string Manipulation Program and output
and perform program based 3 CO-2 & BTL-4 verification
on string manipulation
4. 4 CO-2, CO-3 & Program and output
3
Working with Files BTL-5 verification
5. 5Execute build in functions Program and output
2 CO-3 & BTL-6
of Processing Files verification
6. 6Working with Lists and Program and output
perform various program 2 CO-3 & BTL-6 verification
based on Lists
7. Manipulating of Lists with Program and output
3 CO-4 & BTL-6
python function verification
8. Working with build-in Program and output
functions of Lists and 2 CO-4 & BTL-6 verification
Strings.
9. Execute simple projects and Program and output
perform various python list 2 CO-4 & BTL-6 verification
functions
10. Working with Dictionaries Program and output
and creating simple 2 CO-5 & BTL-6 verification
dictionaries
11. Working with programs like Program and output
2 CO-5 & BTL-6
Counting with Dictionaries verification
12. Working with Dictionaries Program and output
2 CO-5 & BTL-6
and files in python verification
13. Working with Tuples and Program and output
3 CO-5 & BTL-6
create programs of tuples verification

FACULTY SIGNATURE HOD


Document Sl. No: IQACB02 Review Period: Every Semester Validation authority: IQAC

COURSE ASSESSMENT PLAN

Academic Year: 2020-21 (Odd Sem) Department: NE


Programme: B.Tech Semester: V
Course Title: Python Data Structures Course Code:
CSD4386
Course Category: NE Total Duration
(Hrs): 45
Prerequisite: Basic programming knowledge Credits: 2
Instructor (s) : Dr. Renjith P N

Asses Assessmen
Learning Outcome for Pertaini Measurabl Corrective
smen t Method / Duration
Assessment ng COs e Action
t# Activity

Identify and execute Program <50 %-


1 basic syntax and CO1 and Output Marks write new 6 hrs
programs in Python. verification program
Solve problems using
Program <50 %-
Python built-in data
2 C02 and Output Marks write new 6 hrs
types and their verification program
methods.
<50 %-
Working with Lists and Program
Repeat with
3 perform various program C03 and Output Marks 6 hrs
new
based on Lists verification
program
Working with Program <50 %-
4 Dictionaries and files in C04 and Output Marks Debug the 6 hrs
python verification code
<50 %-
Design an application Program
Debug and
5 using Tuples in C05 and Output Marks
correct the
6 hrs
Python. verification
program

FACULTY SIGNATURE HOD


School of Computing Sciences

Department of Computer Science & Engineering

CSD4283 – Python Data Structures


Question Bank
Category: Non-Department Elective
Semester - V

Prepared by:

Dr. Renjith,
Associate Professor,
Department of Computer Science and Engineering
UNIT I PYTHON BASICS
Q. No. Questions CO BT Level
1. Distinguish between pseudocode and flowchart. 1 BTL 4
2. Define function with an example. 1 BTL 1
3. Discuss different modes of operation in python. 1 BTL 2
4. Write a simple python program to perform addition of two values. 1 BTL3
5. Distinguish between string and list. 1 BTL 4
6. Infer how does python interpreter work? 1 BTL 5

7. Evaluate the order of precedence of operators in python. 1 BTL 5


8. Develop an algorithm to convert Temperature in Celsius to Fahrenheit. 1 BTL 6
9. List the basic symbols used in drawing the flowchart for sequence control 1
structure. BTL 1
10. Classify different types of statements in python. 1 BTL 4
PART B
1. Analyze the model of interpreter and explain how python 1
works in different modes. BTL 4
2. Evaluate the different values (data types) and types of values that can be used 1
BTL 5
in Python.
3. (i)Summarize the advantages and disadvantages of flowchart. 1
(ii) Summarize the symbols used in flowchart. BTL 2
4. List the different operators in python and estimate the 1
BTL 1
precedence of execution.
5. Explain pseudocode and its rules also give examples for sequence , selection 1
and repetition type problems. BTL 1
6. List the types of operators in python and thus explain the different expressions 1
involved in python. BTL 3
7. Write an algorithm, pseudocode and draw the flowchart to find the factorial 1
of a number n. BTL 6
8. Design a calculator with python code by defining its 1
algorithm using different notations. BTL 6
9. Write an algorithm, pseudocode and draw the flowchart to check whether the 1
given number is palindrome or not.
BTL 5
10. Rate the order of execution of different expressions by evaluating them 1
through python program. BTL 5
UNIT 2 CONTROL FLOW STATEMENTS AND FUNCTIONS
Q. No. Questions CO BT Level
1. Write a program to print n numbers iteratively. 2 BTL 6
2. Using the concept of functions, calculate the area of a circle. 2 BTL 3
3. Using the concept of tuple assignment, how will you swap two values? 2 BTL 3
4. What do you mean by fruitful function? 2 BTL 2
5. Outline the scope of variables. 2 BTL 2
6. Write the syntax of if-else statements. 2 BTL 1
7. Differentiate for loop and while loop. 2 BTL 4
8. Illustrate the flowchart of if-elif-else statements. 2 BTL 3
9. How would you test the significance of for loop with else in an example. 2 BTL 5
10. Present the flow of execution for a while statement. 2 BTL 1
PART B
1. Create a user defined fruitful function to test a given year is a leap year. 2 BTL 6
2. Write a function to determine whether a given natural number is a perfect 2
number. A natural number is said to be a perfect number if it is the sum of its BTL 6
divisors.
3. Write a function reads two numbers and evaluates whether they or co-prime or 2
not. Two numbers are said to be co-prime if they do not have any common BTL 5
divisor other than one.
4. Write a function to multiply two non-negative numbers by repeated addition 2
BTL 5
and evaluate the result by normal procedure.
5. Write the syntax and explain the concept of 2
(i) recursive function with an example. BTL 1
(ii) lambda function with an example.
6. Write a Python program using function to find the sum of first ‘n’ even 2
BTL 4
numbers and print the result.
7. Using a python program, analyze the different logic behind swapping the 2
BTL 4
values between variables.
8. Write a Python program using function to find the sum of first ‘n’ even 2
BTL 4
numbers and print the result
9. Write a code to print all numbers in a range (a,b)divisible by a given number 2
BTL 3
(n).
10. What is function? How a function is defined and called in python? Explain 2
BTL 1
with a simple program.

UNIT 3 LIST AND TUPLES


Q. Questions CO BT
No. Level
1. Illustrate negative indexing in list with an example. 3 BTL 3
2. How to slice a list in Python? 3 BTL 2
3. Point out the methods that are available with list object in Python programming. 3 BTL 4
4. Write a program to create a list of even numbers in a given range. 3 BTL 6
5. Write the syntax for concatenating two lists in python. 3 BTL 2
6. Show how Tuples are immutable? 3 BTL 2
7. Classify the Python accessing elements in a Tuples. 3 BTL 3
8. Point out the methods used in Tuples 3 BTL 4
9. Evaluate the difference between lists and tuples. 3 BTL 5
10. Show how Tuples are used as return values? 3 BTL 5
PART B
1. Write a function that takes a list of numbers as input from the user and produces
3 BTL 6
the corresponding cumulative list.
2. (i)Explain the basic Tuple operations with examples.
(ii)Illustrate a program to check whether an element ‘y’ and‘a’ belongs to the
tuple 3 BTL 2
mytuple=(‘p’,’y’,’t’,’h’,’o’,n’) and after printing the result, delete the Tuple.

3. Write a function to perform sorting of given numbers and present a list of odd and
3 BTL 6
even numbers separately.
4. Write a function ‘leftCirculate’ that takes a list as an input and left circulates the
values in the list so that in the final list, each value is left shifted by one position 3 BTL 5
and leftmost value in the original list now appears as the rightmost value.
5. Write a program to delete all the duplicate elements in a list. 3 BTL 5
6. Describe the following
(i) Creating the list
(ii) Accessing values in the lists 3 BTL 1
(iii) Updating the list
(iv) Deleting the list elements
7. (i) Analyze the basic list operations in detail with necessary programs.
3 BTL 4
(ii) Write a Python program to add two matrices.
8. (i) Tell the Python list methods with examples.
(ii) Why it is necessary to have both the functions append and extend? What
is the result of the following expression that uses append where it probably 3 BTL 1
intended to use extend? >>>lst=[1,2,3]
>>>lst.append([4,5,6])
9. Demonstrate the working of +,* and slice operators in python lists and tuples. 3 BTL 3
10. (i) What is a Python Tuple? What are the advantages of Tuple over list?
3 BTL 1
(ii)“Tuples are immutable”. Explain with example.

UNIT 4 STRINGS, DICTIONARIES & SET


Q. No. Questions CO BT
Level
1. What will be the output of print(str[2:5]) if str=’hello world!’?
4 BTL 5
2. How to add and remove data in set? 4 BTL 2
3. Describe any 4 methods used on a string. 4 BTL 3
4. What does D.itemreturns? Give an example. 4 BTL 3
5. Do set supports indexing. Justify the answer. 4 BTL 4
6. Are dictionary and set different. Justify your answer. 4 BTL 5
7. Write an example for string traversal. 4 BTL 2
8. Describe string module. 4 BTL 2
9. What does the module mean? 4 BTL 1
10. What does the function join in a string used for? 4 BTL 4
PART B
1. (i) Write a function to find the number of common characters in two strings.
4 BTL 6
(ii) Write a program to reverse a string.
2. Write a function that takes a number as an input parameter and returns the
corresponding text in words, for example, on input 452, the function should return 4 BTL 6
‘Four Five Two’. Use a dictionary for mapping digits to their string representation.
3. Using a dictionary variable, estimate the frequency of each character in a sentence
4 BTL 5
obtained from the user.
4. Evaluate the different operations like union, intersection and differences of list using
4 BTL 5
Set and functions.
5. Write a program that takes a sentence as input from the user and computes the
4 BTL 3
frequency of each letter. Use a variable of dictionary type to maintain the count.
6. Python strings are immutable. Justify with an example
4 BTL 4
program.
7. (i) Analyze string slicing. Illustrate how it is done in python with an example.
4 BTL 4
(ii) Write a python code to search a string in the given list.
8. Using the concept of dictionary, Show a dictionary of frequency of words for a given
4 BTL 1
text.
9. Compare and contrast different functions and methods used in dictionaries and set. 4 BTL 4
10. Write a function that takes a string as a parameter and replaces the first letter of
4 BTL 5
everyword with the corresponding uppercase letter.

UNIT 5 FILES, MODULES, PACKAGES


Q. No. Questions CO BT Level
1. Define the access modes 5 BTL 1
2. Distinguish between files and modules. 5 BTL 2
3. Define read and write file 5 BTL 1
4. Describe renaming and deleting a file in python. 5 BTL 2
5. Discover the format operator available in files. 5 BTL 3
6. Examine the need for exceptions using an example 5 BTL 4
7. Explain Built-in exceptions. 5 BTL 5
8. Difference between built-in exceptions and handling exception 5 BTL 1
9. Write a program to write a data in a file for both write and append modes. 5 BTL 5
10. How to import statements? 5 BTL 1
PART B
1. Create a program to compute price per unit weight of an item using try – except – 5
else block. BTL 6
2. Write a program that reads the contents of the file text.txt and counts the number 5
of alphabets, blank spaces, lowercase letters and uppercase letters, the number of
words starting with a vowel, and the number of
occurrences of the word ‘is’ in the file. BTL 6
3. Write a function that reads a file file1 and evaluates and displays number of words 5
and vowels in the file. BTL 5
4. (i) Describe the use of try block and except block in python with syntax. 5
(ii) Describe with an example exceptions with arguments in python. BTL 1
5. (i) Explain with example of writing a file 5
(ii) Discover syntax for reading from a file BTL 3
6. (i) Structure Renaming a file 5
(ii) Explain about the files related methods BTL 4
7. (i) Describe python modules 5
(ii) Describe python packages BTL 1
8. Write a program that will prompt the user for a string and a file name, and then 5
print all lines in the file that contain the string. Also interpret the obtained result. BTL 5
9. Identify the various methods used to delete the elements from the dictionary 5 BTL 1
10. Illustrate a program to find the one’s complement of binary number using file. 5 BTL 2
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CSD4386 - Python Data Structures
Student Nominal Roll

Sl. No Reg. No Name


1 18101062 sanmitra meakala
2 18103029 tharika sundaram
3 18103069 Karthikeyan Ponmudi
4 18104022 Sai Prithvi
5 18104098 Sarangam sai Naveen
6 18127071 John Isaac
7 18130066 Hari Haran
8 18132049 Jenifer Rajkumar
9 18134001 Samita Ramesh
10 18134002 Albinus Sanjeevan D
11 18134006 Akash Venkatesan
12 18134009 Arvinth Sitharthaa
13 18134014 Ajay Karthi PV
14 18134015 Muhammad Sajith
15 18134024 Jane Carolyn
16 18134026 Girish Murali
17 18134029 Aluri Pameela Manyatha
18 18134034 Allen Rafealson
19 18134035 Akash Shiv Janardhan
20 18134038 Charan Kumar
21 18134039 Sourav Sunil
Assignment – I
List Basics

Assignment -1I
Question:
Python Dictionary
Assignment: 3
1. What does the following Python Program print out?

str1 = "Hello"
str2 = 'there'
bob = str1 + str2
print(bob)

2. What does the following Python program print out?


x = '40'
y = int(x) + 2
print(y)
3. How would you use the index operator [] to print out the letter q from the following string?
x = 'From marquard@uct.ac.za'

How would you use string slicing [:] to print out 'uct' from the following string?

1
x = 'From marquard@uct.ac.za'

What is the iteration variable in the following Python code?

1
2
for letter in 'banana' :
print(letter)

4. What does the following Python code print out ?


print(len('banana')*7)

How would you print out the following variable in all upper case in Python?
greet = 'Hello Bob'

5. Which of the following is not a valid string method in Python?


Twist()
Startwith()
Join()
Split()

6. What will the following Python code print out?


data = 'From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008'
pos = data.find('.')
print(data[pos:pos+3])

7. Which of the following string methods removes whitespace from both the beginning and end
of a string?

strip()

Assignment – 4

Completion of Python Certification –Python Data Structures (Coursera)

https://drive.google.com/drive/folders/1oHuRZEtnkjLPTfOqHWYe_oc64qnBQuZY?usp=s
haring

COURSE MATERIALS
https://drive.google.com/drive/folders/1DLyhL_YJTeW2dEM7HZQGhSpK7mYSyeeo?usp
=sharing
HINDUSTAN INSTITUTE OF TECHNOLOGY AND SCIENCE
Sub. Code: CSD4386 - PYTHON DATA
STRUCTURES

I PERIODICAL EXAMINATION
DEPT COMPUTER SCIENCE AND ENGINEERING SEM III
SECTION DATE 15/09/2020
MAX
DURATION 50 Mins MARKS 30

QUESTIONS

QUESTION PART-A (10 X 1 MARKS = 10 MARKS)-MCQ


CO BTL Marks
NO.

1.Let a=15, b=4 what is a//b ?


(1 Point)
1 3.75 1 1 1
3.5
3
let a=5, b=6 then what will be value of a and b after
executing the expression below: a,b=b,a
(1 Point)
2 1 1 1
a=5, b=6
a=6, b=5
syntax error
for the given list L1=[1,2,3,4,5, ........], how to get the
element before last element in the list.
(1 Point)
3 1 1 1
L1[: : -1]
L1[:-1]
L1[:-2]
P=10, q=20, p*=q//3 q+=p+q**2 print(p,q)
(1 Point)
(60,480)
4 1 1 1
(50,480)
(480,60)
(80,180)
What is the Datatype -> "False"
(1 Point)
Boolean
5 1 1 1
String
None
Floating Point
what is the output of the following program x=10 y=0
while(x>y): x=x-4 y+=4 print(x,end=" ")
(1 Point)
6. 60 2 2 1
62
Syntax Error
None of the above ‘I learned Python
What is the data type tuple=("a")
(1 Point)
List
7. 2 2 1
Tuple
String
int
8. A string is a ______________________ of character 2 2 1

Fill up the blanks: list1=[1,2,3,4,5,6] for i in ___________


:
print(list1[i])
9. 2 2 1
range(list1)
list1
range(len(list1))

tuple1=(0,1,2,3) tuple2=("python","programming")
tuple3=(tuple1,tuple2) print(tuple3)
(1 Point)
10. 2 2 1
(0,1,2,3)
(0,1,2,3,"python","programming")
((0,1,2,3),("python","programming"))
PART: B
PART B (2 X 10 MARKS = 20 MARKS) -Assignment Type -
QUESTION No choice CO BTL Marks
NO.

i) Write python programming using user defined modules to


11. 1 3 10
create simple calculator. [5]
ii) Write a python program to create a dictionary comprising
of countries and their corresponding capital cities. Prompt
the user to enter a country and display the corresponding
capital city. [5]
i) Write Python programs using Time and Calendar related
functions to print the current time using time module and
Display the calendar of febuary month of the 2010 using
calendar module.
12. 2 3 10
ii) Write a python program to find the element in the list is
odd or even. If the element is odd increment with 10 and if
its even increment with 20.

HINDUSTAN INSTITUTE OF TECHNOLOGY AND SCIENCE

Sub. Code: CSD4386 - PYTHON DATA STRUCTURES

II PERIODICAL EXAMINATION
DEPT COMPUTER SCIENCE AND ENGINEERING SEM III
SECTION DATE 12/10/2020
MAX
DURATION 50 Mins MARKS 30

QUESTIONS

QUESTION PART-A (10 X 1 MARKS = 10 MARKS)-MCQ


CO BTL Marks
NO.

How are Python dictionaries different from Python lists?

Python lists maintain order and dictionaries do not maintain


1 order 2 1 1
Python lists can store strings and dictionaries can only store words
Python lists store multiple values and dictionaries store a single value
Python dictionaries are a collection and lists are not a collection
What is a term commonly used to describe the Python dictionary
feature in other programming languages?
2 2 1 1
Closures
Associative arrays
Sequences
Lambdas
What would the following Python code print out?
stuff = dict()
print(stuff['candy'])
3 2 1 1
0
candy
The program would fail with a traceback
-1
What is a common use of Python dictionaries in a program?

Computing an average of a set of numbers


4 Building a histogram counting the occurrences of various strings 3 1 1
in a file
Splitting a line of input into words using a space as a delimiter
Sorting a list of names into alphabetical order
In the following Python, what does the for loop iterate through?
x = dict()
...
for y in x :
...
5 3 1 1
It loops through the integers in the range from zero through the
length of the dictionary
It loops through all of the dictionaries in the program
It loops through the values in the dictionary
It loops through the keys in the dictionary
Find the answer for the program below?
'amI learned Python' [2:999]

6. 'amI learned Python' 3 2 1


‘’
Index Error
‘I learned Python’
sample_str = 'Python String'
print (sample_str[-2])
7. y 3 2 1
t
n
g
Choose the correct option.
8. 3 2 1
A. In Python, a tuple can contain only integers as its elements.
B. In Python, a tuple can contain only strings as its elements.
C. In Python, a tuple can contain both integers and strings as its
elements.
D. In Python, a tuple can contain either string or integer but not both
at a time.

What will be the output of the program?


tuple1=(1,2,3)
tuple3=tuple1*2
print(tuple3)
9. 3 2 1
(2,4,6)
(1,2,3,1,2,3)
(1,2,3)
none

Which of the following two Python codes will give same output?
(i) print(tupl[:-1])
(ii) print(tupl[0:5])
10. (iii) print(tupl[0:4]) 3 2 1
(iv) print(tupl[-4:])

If tupl=(5,3,1,9,0)

PART: B
PART B (2 X 10 MARKS = 20 MARKS) -Assignment Type -No
QUESTION choice CO BTL Marks
NO.

i) Demonstrate in detail on Math Operator in python with simple


python programming. [5]
11. 2 3 10
ii) Write a python program to perform Matrix operations like
Addition, Subtraction and Multiplication for 3 x 3 matrices. [5]
Write a python program with MySQL to create an Employee
12. Management application. The application should be capable of 3 3 10
adding new entries, updating the entries and delete the entries.
CSD4386 - PYTHON DATA STRUCTURES
CIA – I Internal Marks
Out of
Sl. No Reg. No Name PART A 11 - CO1 12 -C02 Total 100
Karthikeyan
1 18103069 Ponmudi 1 9 10 10 33
tharika
2 18103029 sundaram 6 9 9 15 50
sanmitra
3 18101062 meakala 6 9 9 15 50
4 18134001 Samita Ramesh 6 9 10 15 50
5 18130066 Hari Haran 4 9 9 13 43
Arvinth
6 18134009 Sitharthaa 4 9 9 13 43
7 18134024 Jane Carolyn 2 9 10 11 37
8 18134034 Allen Rafealson 6 9 9 15 50
Akash Shiv
9 18134035 Janardhan 4 8 9 12 40
Akash
10 18134006 Venkatesan 5 9 9 14 47
Jenifer
11 18132049 Rajkumar 5 9 9 14 47
12 18134014 Ajay Karthi PV 4 9 10 13 43
13 18134038 Charan Kumar 5 9 9 14 47
14 18134029 Aluri Manyatha 4 6 6 10 33
15 18104022 Sai Prithvi 6 9 9 15 50
16 18134026 Girish Murali 2 9 9 11 37
17 18134039 Sourav Sunil 4 9 6 13 43
Muhammad
18 18134015 Sajith 4 8 8 12 40
Albinus
19 18134002 Sanjeevan D 4 9 9 13 43
Sarangam sai
20 18104098 Naveen 2 8 9 10 33
21 18127071 John Isaac 2 9 9 11 37
17 20
Total Students
Cos Threshold secured % of Attainment
CO1 80 17 80.95238095
CO2 70 20 95.23809524

CIA - I
100
90
80
70
60
50
40
30
20
10
0
Threshold Total Students secured % of Attainment

CO1 CO2
CSD4386 - PYTHON DATA STRUCTURES
CIA – II Internal Marks

Sl. Out of Out of Out of


Reg. No Name PART A 11 12 Part B
No 30 100 50
sanmitra
1 18101062 meakala 9 9 10 19 28 93.52 46.76
tharika
2 18103029 sundaram 9 9 9 18 27 90.18 45.09
3 18104022 Sai Prithvi 9 9 10 19 28 93.52 46.76
Sarangam sai
4 18104098 Naveen 6 9 9 18 24 80.16 40.08
5 18127071 John Isaac 6 9 10 19 25 83.5 41.75
6 18130066 Hari Haran 7 9 9 18 25 83.5 41.75
Jenifer
7 18132049 Rajkumar 7 9 9 18 25 83.5 41.75
Samita
8 18134001 Ramesh 4 10 9 19 23 76.82 38.41
Akash
9 18134006 Venkatesan 5 9 9 18 23 76.82 38.41
Arvinth
10 18134009 Sitharthaa 8 8 8 16 24 80.16 40.08
11 18134014 Ajay Karthi PV 9 9 10 19 28 93.52 46.76
Muhammad
12 18134015 Sajith 9 8 8 16 25 83.5 41.75
13 18134024 Jane Carolyn 8 9 9 18 26 86.84 43.42
14 18134026 Girish Murali 8 9 9 18 26 86.84 43.42
Aluri
15 18134029 Manyatha 7 9 9 18 25 83.5 41.75
Allen
16 18134034 Rafealson 8 9 10 19 27 90.18 45.09
Akash Shiv
17 18134035 Janardhan 8 9 9 18 26 86.84 43.42
18 18134038 Charan Kumar 8 9 9 18 26 86.84 43.42
19 18134039 Sourav Sunil 8 9 9 18 26 86.84 43.42
Albinus
20 18134002 Sanjeevan D 10 9 9 18 28 93.52 46.76
Threshold % of
Cos of Cos Obtained attainment

CO2 70 20 95.2381

CO3 80 18 85.71429

CIA II
100
90
80
70
60
50
40
30
20
10
0
Threshold of Cos % of attainment

CO2 CO3
CSD4386 - PYTHON DATA STRUCTURES
Cumulative CIA Internal Marks
Sl. Internal Internal Final
Reg. No Name Assignments Certificates Total 45 Attendance
No Exam 1 Exam 2 Score
1 18101062 sanmitra meakala 12 14 8 5 39 5 44
2 18103029 tharika sundaram 12 14 9 5 40 5 45
3 18103069 Karthikeyan Ponmudi 10 14 5 5 34 5 39
4 18104022 Sai Prithvi 12 14 6 5 37 5 42
5 18104098 Sarangam sai Naveen 10 12 8 5 34 5 39
6 18127071 John Isaac 10 13 7 0 30 5 35
7 18130066 Hari Haran 11 13 7 5 36 5 41
8 18132049 Jenifer Rajkumar 12 13 8 5 38 5 43
9 18134001 Samita Ramesh 13 12 10 5 40 5 45
10 18134002 Albinus Sanjeevan D 11 14 9 5 39 5 44
11 18134006 Akash Venkatesan 12 12 8 5 37 5 42
12 18134009 Arvinth Sitharthaa 11 12 8 5 36 5 41
13 18134014 Ajay Karthi PV 12 14 8 5 38 5 43
14 18134015 Muhammad Sajith 10 13 8 5 36 5 41
15 18134024 Jane Carolyn 11 13 9 4 37 5 42
16 18134026 Girish Murali 10 13 8 5 36 5 41
17 18134029 Aluri Pameela 8 13 8 5 34 5 39
18 18134034 Allen Rafealson 12 14 8 5 39 5 44
19 18134035 Akash Shiv Janardhan 11 13 8 5 37 5 42
20 18134038 Charan Kumar 12 13 9 5 39 5 44
21 18134039 Sourav Sunil 10 13 8 5 36 5 41
0 0 2 21
COURSE EXIT SURVEY
1. Quality of the course content

50
40
30
20
10
0
Excellent Very Good Good Satisfactory Poor

2. For the number of credits and course workload was

60

40

20

0
Excellent Very Good Good Satisfactory Poor

3. Relevance of the text book of the course

50
40
30
20
10
0
Excellent Very Good Good Satisfactory Poor

4.Were the lectures clear/well organized and presented at reasonable pace?


80

60

40

20

0
Excellent Very Good Good Satisfactory Poor

4. Did the lectures stimulate intellectually?

100

80

60

40

20

0
Excellent Very Good Good Satisfactory Poor

5. What approaches/aids would facilitate your learning?

60
50
40
30
20
10
0

6. Did the tutorials in class room helps you to understand how to take the problem?
80

60

40

20

0
Excellent Very Good Good Satisfactory Poor

7. Is the grading scheme clearly outlined and reasonable/fair

100

80

60

40

20

0
Excellent Very Good Good Satisfactory Poor

Innovative teaching practices in TLP


1. The students are trained with flipped classroom teaching
2. The students are ensuring to complete the Coursera certification
3. Utilized tools like onlinegdb and other online compilers to perform coding
4. Project based learning

Points of appreciation and novelty


1. All the student has completed the python data structure course and generated
Coursera Certification.
2. Developed several small projects by students
Document Sl. No: IQACB04 Review Period: Every Semester Validation authority: IQAC
.
CONTINUOUS QUALITY IMPROVEMENT – CQI REPORT
(COURSE DELIVERY)

Academic Year: 2020-21 (Odd Sem) Department: NE


Programme: B.Tech Semester: V
Course Title: Python Data Structures Course Code: CSD4386
Course Category: Non-Engineering Elective Total Duration (Hrs): 45
Prerequisite: Basic programming knowledge Credits: 2

Challenges/Issues in
Topics Suggestion for CQI CQI Remarks
achieving CLO
Course Delivery
Additional lecture
Introduction to 9 Hrs of duration not Plan can
hours may be allotted
Python sufficient incorporate the
and Follow-up Classes
same

INSTRUCTOR COORDINATOR (CQI) HOD IQAC COORDINATOR

You might also like