15CS664 Assignment2 18 19 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Sri Venkateshwara College of Engineering

Department of Information Science and Engineering

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.

Shivaprakash R, Dept. of ISE, SVCE – Blore.


15 CO4 K2 Briefly discuss self keyword in Python.
16 CO4 K2 What does __str__() method do in Python? Illustrate with a code snippet.
Write a program to create a class Time to represent time in HH:MM:SS format.
Perform
17 following operations:
CO4 K3
a. Overload + to add two time objects
b. Overload + to add a numeric value to a time object (commutative)
c. Overload __str__() to display time in appropriate format
18 CO4 K2 What is a Docstring? Why are they written?
19 CO4 K3 What do you mean by “instance as returning value”? Explain with an example.
20 CO4 K3 Justify the statement “Objects are mutable”.
21 CO4 K2 When do we encounter AttributeError?
22 CO4 K2 How do you find the memory address of an instance of a class?
23 Write a program to add two point objects by overloading + operator. Overload
CO4 K3
__str__() to display point as an ordered pair.
24 Define socket. Explain relationship between user program and socket with a neat
CO5 K2
diagram.
25 CO5 K2 Write a socket-based program to extract the data from a given webpage.
26 CO5 K2 Write a socket-based program to retrieve image form the given webpage.
27 CO5 K2 What is urllib? How is it different from socket?
Write a program using urllib to retrieve the data for romeo.txt (Ref 1) and compute the
frequency of each word.

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

Shivaprakash R, Dept. of ISE, SVCE – Blore.


nodes? Illustrate with a program.
36 CO5 K2 Discuss the concept of JSON.
37 CO5 K2 Write a program to parse data in JSON format.
38 CO5 K2 What do you mean by API? Explain with suitable SOA diagram.
39 CO5 K3 Write a program to extract location information using Google geocoding API.
40 CO5 K2 Write a note on OAuth.
41 CO5 K2 Discuss the concept of databases.
42 CO5 K3 What are the important data types supported by SQLite?
43 CO5 K3 How do you create a database table? Give a code snippet.
44 CO5 K2 Explain the working of database cursor with suitable diagram.
45 Write a program to create a database StudentDB with attributes Name and Age. Insert
CO5 K3
n records into the table and display the same.
46 CO5 K2 What are different types of keys used in RDBMS? Explain.
47 CO5 K2 Write a note on data modelling.
48 CO5 K2 How do you join multiple tables? Illustrate with a program.
49 CO5 K2 What is web scraping? Give an example.
50 CO5 K2 Define a Port. What is the port number used in socket programming with HTTP?
51 CO5 K2 What is a web service? Name the two formats that are used to exchange data in web.
52 CO5 K2 Define a database.
53 CO5 K2 What is a database management system? Give examples.
54 K2 Explain the following database concept
CO5
a. Field b. record c. Primary Key d. table
K2 What is SQL? Explain the following SQL statements
a. CREATE TABLE
55 b. INSERT
CO5
c. SELECT
d. DELETE
e. UPDATE
56 CO5 K2 Write a note on HTTP.

Course Coordinator Programme Coordinator

Shivaprakash R, Dept. of ISE, SVCE – Blore.

You might also like