Solution to Python Application Programming Question Paper July 2019


A solution to Python Application Programming Question Paper July 2019 15CS664 / 17CS664 / 18CS752

Here you find the Solution to subject Python Application Programming Question Paper July-2019.

Module 1

Q. NO. 1

a. List the features of Python Programming Language. (05Marks)

b. What are the roles of a programmer? List any two skills required to be a ptogrammer. (05 Marks)

c. Explain th chained and nested conditional execution statement along with syntax and flow chart. (06 Marks)

Q. No. 2.

a. what are Python words and sentences? Explain with examples for each. (04 Marks)

b. Differentiate between compiler and interpreter. (04 Marks)

c. Write a Python program to find the i) largest of three numbers

ii) check whether the given year is a leap year or not using functions. (08 Marks)

Module 2

Q. NO. 3

a. With examples explain finite and infinite looping constructs. What is the need for a break and continue statement? (08 Marks)

b. Write a Python program to generate and print prime numbers in the range of 2 to 50. (04 Marks)

c. What are string Slices? Explain the slicing operator in Python with example. (04 Marks)

Q. No. 4

a. Write a Python program to find the number of occurances of a each word in the given file. (06 Marks)

Click here for Video Tutorial

b. Write a python function that takes a decimal number as input and convert to binary equivalent and return the same. (04 Marks)

c. Explain any six methods associated with strings and explain with examples. (06 Marks)

Solution click here

Module 3

Q. NO. 5

a. What are the ways of traversing the list? Explain with and example. (04 Marks)

b. Differentiate POP and remove methods on lists. How to delete more than one element from the list? (06 Marks)

c. Write a python program that accepts a sentence and build a dictionary with LETTER, DIGITS, LOWERCASE, and UPPERCASE as key values and their count in the sentence as the values. Example: Str = VTU@123.e-Learning Output: d = {“LETTER”: 12, “DIGITS”: 3, “LOWERCASE”: 8, “UPPERCASE”: 4} (04 Marks)

Solution video tutorial

Q. No. 6

a. Compare and contrast list and tuples. (04 Marks)

b. Write a python program to check the validity of a password. The password should contain at least, i) one lower case letter, ii) one digit, iii) one uppercase letter iv) one special character [$@#!] v) six characters long. The program should accept a password and check the validity of the password using the above criteria and print “Valid” and “Invalid” as the case may be. (08 Marks)

Solution Web Notes and Video tutorial

c. Demonstrate i) how a dictionary can be represented as a list of tuples ii) How tuples can be used as keys in dictionaries. (04 Marks)

Module 4

Q. NO. 7

a. What is a class? How to define a class in Python? How to instantiate a class and how the class members are accepted? (04 Marks)

b. DIfferentiate class variable and instance variables. (02 Marks)

c. Write a Python program that uses the DateTime module of Python. Within the class takes a birthday as input and prints the age and the number of days, hours, minutes, and seconds until the next birthday. (10 Marks)

Q. No. 8

a. Write a python program that has Point class with attributes as x and y for coordinates. Create two objects of this class and find the midpoint of both the points. Also, add a method reflex_x to class to a class Point, which returns the new point which is the reflection of the point about the x-axis. (06 Marks)

Solution Video Tutorial

b. Differentiate between simple, mulltiple and multi-level inheritance. (06 Marks)

c. Write a program that has a class Person. Inherit a class Student from Person class which also has a class MarksAttendance. Assume the Attributes for Person class as USN, Name, dob, and gender. Attribute for Student class: Class, Brach, Year, MA. Attributes for MarksAttendance: Marks and attendance. Create a student S = Student (‘1AB16CS005’, ‘XYZ’, “18-01-90′, ‘M’, 85, 98) and display the details of student. (04 Marks)

Module 5

Q. NO. 9.

a. Demonstrate with the help of Python construct: i) How to retrieve an image over HTTP? ii) How t retrieve web pages with URL lib? (08 Marks)

Solution Video Tutorial of – i and Video Tutorial of – ii

b. Comapare and contrast JavaScript Object Notation (JSON) and XML. (04 Marks)

c. WHat is the service oriented architecture? Explain the same. (04 Marks)

Q. No. 10.

a. Write a Python program to retrieve a user’s Twitter friends. Parse the returned JSON and extract some of the information about the friends. (08 Marks)

b. Write a simple spidering program that will go through the Twitter accounts and build a database of them. (08 Marks)

If you like Solution to Python Application Programming Question Paper July 2019 15CS664 / 17CS664 / 18CS752 – do like and share with your friends. Also, subscribe to the YouTube channel.

Leave a Comment

Your email address will not be published. Required fields are marked *