R17 Regulation Subject code: 1P7FC
TKR COLLEGE OF ENGINEERING AND TECHNOLOGY
(Autonomous, Accredited by NAAC with ‘A’ Grade)
B.Tech IV Year I Semester Regular Examinations, February 2021
Python Programming
(Information Technology)
Maximum Marks: 70 Date: 25.02.2021 Duration: 3 hours
Note: 1.This question paper contains two parts A and B.
2. Part A is compulsory which carries 20 marks. Answer all questions in Part A.
3. Part B consists of 5 Units. Answer any one full question from each unit.
4. Each question carries 10 marks and may have a, b, c, d as sub questions.
Part-A
All the following questions carry equal marks (10x2M=20 Marks)
1 Demonstrate the various operators in python.
2 Write a Python program to find the given year is leap year or not.
3 Discuss the different ways of creating modules and packages with examples
4 Explain Exception Handling in python.
5 What is Global Interpreter Lock.
6 List down the threads and Processes.
7 Compare Web client and Web server in Python web programming.
8 What are CGI Helping Servers to process Client Data ?
9 What are ORMs in python ?
10 What are the python modules useful for connecting python with various Databases?
Part-B
Answer All the following questions. (10M X 5=50Marks)
11 a) Develop a python Program to count the number of vowels in a string provided by the
user. (5M)
b) Write the python program to generate the Fibonacci series.(5M)
OR
12 a) Explain in detail about file built-in methods and file built-in attributes? (5M)
b) Write a program to perform different arithmetic operations. (5M)
13 Write a program that reads the contents of the file text.txt and counts the number of
alphabets, blank spaces, lowercase letters and uppercase letters, the number of words
starting with a vowel, and the number of occurrences of the word ‘is’ in the file. (10M)
OR
14 Discuss the following methods associated with the file object with an example. (10M)
i)read () ii) read line() iii) read lines() iv) tell() v) seek() vi) write()
15 What is Module in Python? Explain, how can you use Modules in your program with an
example? Explain python built-in exceptions? (10M)
OR
16 What is the purpose of Regular expressions in python? Write a python program to utilize
all Special symbols and Characters of regular expressions. (10M)
Page 1 of 2
17 Write a TKinter program to create GUI for a shopping cart. (10M)
OR
18 Create a CGI based Web Application in python for Library Management. (10M)
19 Explain DB-API based python database programming with example. (10M)
OR
20 Develop a Python program to manage your class database. ( Name, DOB, Reg.No, Addr,
Phone No, Mark) (10M)
Page 2 of 2