# Solution to Python Application Programming Question Paper Jan 2019 15CS664

• ## Computer Graphics OpenGL Mini Projects

### Solution to Python Application Programming Question Paper Jan 2019 15CS664

Subject: Python Application Programming Year: Jan 2019 Subject Code: 15CS664

### Module – 1

Q No. 1.
a) Explain the following i) skills necessary for a programmer ii) interactive mode iii) short circuit evaluation of expression iv) Modulus operator (04 Marks)

b) Mention three types of errors encountered in python programs. Explain the basic building block of python with an example python program to display the format-number (Fn = 22n + 1) for an ‘n’ value prompted by the user. (08 Marks)

c) describe python language support for arithmetic operators. Write a simple python program to calculate student result based on 2 exams. Sports event and activities conducted in the college with the weightage of the activity – 20% and sports – 20% of 50 Marks (04 Marks)

OR

b) Differentiate between argument and parameter. Illustrate the flow of execution of a python function with an example program to convert given Celsius to Fahrenheit temperature. (08 Marks)

### Module – 2

Q. No 3
a) Explain while and for a loop. Write a program to generate Fibonacci series up to the given limit by defining FIBONACCI (n) function. (08 Marks)

b) Mention the advantage of continue statement. Write a program to compute only even numbers sum within the given natural number using continue statement. (08 Marks)

OR

Q. No 4
a) Define a string. How it can be traversed through using a looping statement? Write a python program to display the presence of a given substring in the main string. (08 Marks)

b) How computational fault or computational errors are handled in python? Show it with an example python program to copy all lines beginning with vowels from FROM.txt file to VOWELSTEXT.txt file retaining other lines. (08 Marks)

### Module – 3

b) List merits of dictionary over the list. Write a python program to accept USN and marks obtained. Find the maximum, minimum and student USN who have scored in the range 100 – 85 85-75, 75-60 and below 60 marks separately. (08 Marks)

OR

Q. No 6
a) Compare and contrast tuples with lists. Explain the following operations in tuples i) Sum of two tuples ii) Slicing operator iii) Compression of two tuples iv) Assignment to a variable (08 Marks)

### Module – 4

Q. No 7

b) Explain the init and str method with an example python program. (08 Marks)

OR

Q. No 8

a) Define polymorphism. Demonstrate polymorphism with function to find the histogram to count the numbers of times each letter appears in a word and in a sentence. (08 Marks)

### Module – 5

Q. No 9

a) Explain any two-socket functions. Explain support for HTML using a regular expression with an example program. (08 Marks)

b) Describe the support of security mechanism employed in Internet application with support of API usage with an example program to get four-string and put them in “hidden.py”. (08 Marks)

OR

Q. No 10

a) write a note on XML. Design python program to retrieve a node present in the XML tree. (08 Marks)

b) Brief on structure Query Language with suitable python program. Explain the function involved in the creation of a database table in python. (08 Marks)

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