CSE II I 2305501 Python Programming(EDx)
CSE II I 2305501 Python Programming(EDx)
AUTONOMOUS
(Approved by AICTE, New Delhi, Accredited by NBA (CIV,ECE,MECH,CSE), NAAC with ‘A+’ grade
& Permanently Affiliated to JNTU-GV, Vizianagaram)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam Dist. – 531 162
(A.P.)
Ph: +91-8922-248001, 248002 Fax: + 91-8922-248011
E-mail: [email protected] website: www.raghuenggcollege.com
To generate competent professionals to become part of the industry and research organizations at
the national and international levels.
MISSION
To impart high quality professional training in undergraduate level with emphasis on basic
principles of computer science and Engineering and to foster leading edge research in the fast-
changing field.
To inculcate professional behavior, strong ethical values, innovative research capabilities and
leadership abilities in the young minds so as to work with a commitment.
● M1:To impart high quality professional training at undergraduate level with emphasis on
basic principles of computer science and Engineering and to foster leading edge research
in the fast-changing field.
● M2:To inculcate innovative research capabilities and leadership abilities in the young
minds so as to work with a commitment.
● M3:To inculcate professional behavior, strong ethical values in the young minds so as to
work with a commitment.
MS 1 3 2 2
MS 2 2 3 2
MS 3 2 2 3
PROGRAM OUTCOMES
Graduates of Computer Science and Engineering Will:
PO 1 Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to solve complex engineering
problems.
PO 2 Problem analysis: Identity, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO 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 public health and safety and the cultural, societal, and
environmental concerns.
PO 4 Conduct investigations of complex problems: Use research-based knowledge and
research methods, including design of experiments, analysis, interpretation of data, and
synthesis of the information to provide valid conclusions.
PO 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.
PO 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.
PO 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.
PO 8 Ethics: Apply ethical principles and commit to professional ethics, responsibilities, and
norms of the engineering practice.
PO 9 Individual and team work: Function effectively as an individual and as a member or
leader in diverse teams and multidisciplinary settings.
PO 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.
PO 11 Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s work as a member and
leader in a team, to manage projects and in multidisciplinary environments.
PO 12 Life-long learning: Recognize the need for, and have the preparation and ability to
RAGHU ENGINEERING COLLEGE
AUTONOMOUS
(Approved by AICTE, New Delhi, Accredited by NBA (CIV,ECE,MECH,CSE), NAAC with ‘A+’ grade
& Permanently Affiliated to JNTU-GV, Vizianagaram)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam Dist. – 531 162
(A.P.)
Ph: +91-8922-248001, 248002 Fax: + 91-8922-248011
E-mail: [email protected] website: www.raghuenggcollege.com
3 3 3 2 2 2 2 2 3 3 2 2
PEO 1
3
2 3 3 3 2 2 2 2 3 2 3 3 3 3 3
PEO 2
3 2 2 3 2 2 2 3 3 3 3 3 3 3 3
PEO 3
[Escape Character]
3 Exercise 3- Operators
a) Write a program that asks the user for a weight in kilograms and converts it to
pounds. There are 2.2 pounds in a kilogram
[Arithmetic Operator]
b) Write a program that asks the user to enter three numbers (use three separate input
statements). Create variables called total and average that hold the sum and average of
the three numbers and print out the values of total and average [Arithmetic Operator]
c) Write a program to find power of a number without using loops and built-in functions.
Base and exponent value to be taken from the user
[Arithmetic Operator]
4 Exercise 4- Conditional Statements
a) Write a program to display ‘Valid’ if the value is odd and lesser than 10000, otherwise
‘Invalid’. [if-else]
b) Write a program that asks the user to enter a length in feet. The program should then
give the user the option to convert from feet into inches, yards, miles, millimeters,
centimeters, meters, or kilometers. Say if the user enters a 1, then the program converts
to inches, if they enter a 2, then the program converts to yards, etc.
[elif]
c) Write a program to check whether given character is alphabet or not, if yes check
whether vowel or consonant.
[nested-if]
5 Exercise 5- Looping Statements
a) Write a program to print the following pattern when n (no. of rows) is given as input,
If n=4,
*
**
***
**** [loops]
b) Write a program to display first repeating character from the beginning of the given
string.
[loops]
c) Write a program to print next immediate prime number of the given number.
[loops]
6 Exercise 6- Branching Statements
a) Write a program to display numbers between 1 to n. But, one of the numbers between 1
and n is unsafe and that number shouldn’t be displayed. Assume, unsafe number is a
number which is divisible by 3.
[continue]
b) Write a program to input some numbers repeatedly and print their sum. The program
RAGHU ENGINEERING COLLEGE
AUTONOMOUS
(Approved by AICTE, New Delhi, Accredited by NBA (CIV,ECE,MECH,CSE), NAAC with ‘A+’ grade
& Permanently Affiliated to JNTU-GV, Vizianagaram)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam Dist. – 531 162
(A.P.)
Ph: +91-8922-248001, 248002 Fax: + 91-8922-248011
E-mail: [email protected] website: www.raghuenggcollege.com
ends when the users say no more to enter i.e. normal termination or program aborts
when the number entered is less than 0.
[break]
c) Write a program which takes a string from the user and display each character in single
line, while iterating skip the printing if the character is ‘t’.
[continue]
7 Exercise 7- Lists
a) Write a program to compute cumulative product of a list of numbers [list]
b) Write a program to find the sum of corner elements in the given matrix [list]
c) Write a program that asks the user for an integer and creates a list that consists of the
factors of that integer. [list]
8 Exercise 8- Tuples
a) Given a list of numbers, write a Python program to create a list of tuples having first
element as the number and second element as the cube of the number. [tuple]
b) Write a program to extract only extreme K elements, i.e maximum and minimum K
elements in Tuple.
Input : test_tup = (3, 7, 1, 18, 9), k = 2
Output : 3, 1, 9, 18 [tuple]
c) Write a program to produce a tuple of elements which consists of multiplication of each
element and its adjacent element in the original tuple. [tuple]
9 Exercise 9- Sets
a) Write a program to demonstrate the below functions of Set,
i) add() ii) update() iii) discard() [set]
b) Write a program to demonstrate the below functions of Set,
i) pop() ii) union() iii) intersection() [set]
c) Write a program to demonstrate the below functions of Set,
i) difference ii) isdisjoint() iii) symmetric_difference() [set]
10 Exercise 10- Dictionaries
a) Write a program to count the numbers of characters in the string and store them in a
dictionary data structure.
Sample Input: hello python
Sample Output: 1, e : 1, h : 2, l : 2, n : 1, o : 2, p : 1, t : 1, y : 1 [dictionary]
b) Write a program to use split and join methods in the string and trace a birthday with a
Dictionary data structure. If birthday is not found, display a message ‘Not found’.
Sample Input: 25/08/1991 XYZ 12/02/1990 ABC 01/01/1989 PQR 25-08-1991
Sample Output: The DOB 25/08/1991 found whose name is XYZ [dictionary]
c) Write a program that combines two given lists into a dictionary
Sample Input
jkl def abc ghi
10 20 30 40
RAGHU ENGINEERING COLLEGE
AUTONOMOUS
(Approved by AICTE, New Delhi, Accredited by NBA (CIV,ECE,MECH,CSE), NAAC with ‘A+’ grade
& Permanently Affiliated to JNTU-GV, Vizianagaram)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam Dist. – 531 162
(A.P.)
Ph: +91-8922-248001, 248002 Fax: + 91-8922-248011
E-mail: [email protected] website: www.raghuenggcollege.com
Sample Output
abc:30
def:20
ghi:40
jkl:10 [dictionary]
11 Exercise 11- Strings
a) Write a program to find the reverse of each word in the given list of strings and display
them. [strings]
b) Given a string, the task is to write a program to extract overlapping consecutive string
slices from the original string according to size K. K and string is to be given by user.
[strings]
c) Given a string, the task is to write a program to replace every Nth character in a string
by the given value K. String, K and N must be given the user. [strings]
12 Exercise 12- Functions
a) Write a function called ‘sum_digits’ that is given an integer num and returns the sum of
the digits of num. [functions]
b) Write a function called ‘first_diff’ that is given two strings and returns the first location
in which the strings differ. If the strings are identical, it should return -1.
[functions]
c) Write a function ‘ball_collide’ that takes two balls as parameters and computes if they
are colliding. Your function should return a Boolean representing whether or not the
balls are colliding.
[functions]
Hint: Represent a ball on a plane as a tuple of (x, y, r), r being the radius. If (distance
between two balls centers) <= (sum of their radii) then (they are colliding)
13 Exercise 13- Modules
a) Write a program to work with below functions in math module
i) cos() ii) ceil() iii) sqrt
b) Write a program to work with below functions in os module
i) name ii) getcwd() iii) listdir() – Display only first 10 elements
c) Write a program to work with below functions in statistics module
i) mean() ii) median() iii) mode()
Total: 30hrs
References/Manuals/Software :
1
Text Books:
1) Fundamentals of Python First Programs, Kenneth. A. Lambert, Cengage.
2) Python Programming: A Modern Approach, Vamsi Kurama, Pearson
3) Learning Python, Mark Lutz, Orielly
RAGHU ENGINEERING COLLEGE
AUTONOMOUS
(Approved by AICTE, New Delhi, Accredited by NBA (CIV,ECE,MECH,CSE), NAAC with ‘A+’ grade
& Permanently Affiliated to JNTU-GV, Vizianagaram)
Dakamarri, Bheemunipatnam Mandal, Visakhapatnam Dist. – 531 162
(A.P.)
Ph: +91-8922-248001, 248002 Fax: + 91-8922-248011
E-mail: [email protected] website: www.raghuenggcollege.com
2 Laboratory Manual
CO 1 1 2 2 3 1 - - - - - - 1 2 1 -
CO 2 1 2 2 3 1 - - - - - - 1 2 1 -
CO 3 1 2 2 3 1 - - - - - - 1 2 1 -
1 – Slight, 2 – Moderate, 3 – Substantial, BT- Bloom’s Taxonomy
(Signature) (Signature)
Head of the Department Principal
(Seal/Stamp) (Seal/Stamp)