15CS664 Assignment2 18 19 PDF
15CS664 Assignment2 18 19 PDF
15CS664 Assignment2 18 19 PDF
Assignment -2
A.Y: 2018-19 Even sem Sem: 6th ISE
Subject code: 15CS664 Subject: Python Application Programming
Sl.No CO KL Question
1 CO3 K2 Write in brief about Tuple in python. Write operations with suitable examples.
2 CO3 K2 Compare List and Tuple.
3 CO3 K2 Explain about fruitful functions with suitable examples.
4 CO3 K2 Explain about void functions with suitable examples.
CO3 K3 Write a Python program to read all the lines in a file accepted from the user and print all
5 the email addresses contained in it. Assume the email address contain only non-white
space characters.
CO3 K3 Write a Python program to search for lines that start with the word ‘From’ and a
6 character followed by a two-digit number between 00 and 99 followed by ‘:’ Print the
number if it is greater than Zero. Assume any input file.
7 CO4 K3 Define class and object. Given an example for creating a class and an object of that
class.
Write a program to create a class called Point with two attributes x and y. Write
following functions and demonstrate the working of these functions by creating
suitable
8 CO4 K3 objects.
a. To read attribute values
b. To display point as an ordered pair
c. To find distance between two points
Write a program to create a class called Rectangle with the help of a corner point,
width
9 and height. Write following functions and demonstrate their working:
CO4 K3
a. To find and display center of rectangle
b. To display point as an ordered pair
c. To resize the rectangle
10 CO4 K3 Differentiate copy.copy() and copy.deepcopy() with suitable examples.
11 CO4 K3 Discuss the methods isinstance(), hasattr() and vars() with suitable examples.
12 CO4 K3 Differentiate pure functions and modifiers with suitable examples.
13 CO4 K3 Differentiate methods and functions.
14 Discuss the significance of __init__() method in Python with a proper example code
CO4 K2
snippet.
28 CO5 K2
Ref: 1
29 CO5 K2 Write a program to download an image from a given website using urllib.
30 How do you parse HTML using regular expressions? Write a program to illustrate the
CO5 K3
same.
31
How do you parse HTML using BeautifulSoup? Write a program to illustrate the
CO5 K2
same.
32 CO5 K2 Write a program to extract various parts of anchor tag using BeautifulSoup.
33 CO5 K3 Briefly discuss XML and its tree representation with example.
34 CO5 K3 Write a program to extract data from XML string.
35 CO5 K3 How do you extract data from XML when XML document is containing multiple