Code No: R1621054
II B. Tech I Semester Supplementary Examinations, May – 2018
PYTHON PROGRAMMING (Com to CSE & IT)Time: 3 hours Max. Marks: 70
Note: 1. Question Paper consists of two parts (Part-A and Part-B) 2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PART ?A
1. a)What happens if a semicolon (;) is placed at the end of a Python statement? (2M)
b)What are membership operators? Give examples for usage. (3M)
c)What is a dictionary in Python? (2M)
d)Can a Python function return multiple values? If yes, how it works? (2M)
e)How to make a Python class member variable hidden from outside the class? (2M)
f) Write Python program to calculate your age in days. (days between Today and
Date of Birth) (3M)
PART -B
2. a)What are different applications of Python? Give examples. (6M)
b) Write a Python program to convert height in feet and inches to cm.
[1 feet = 12 inch and 1 inch= 2.54 cm] (Sample input: 2 feet 7 inch Sample output: 78.74 cm) (8M)
3. a) List and explain different arithmetic operators supported by Python. Discuss
about their precedence and associativity. (7M)
b) Write a Python program to print all prime numbers less than 256. (7M)
4. a) Write a Python program that interchanges the first and last characters of a
given string. (6M)
b) Give a comparison between lists, tuples, dictionaries and sets. (8M)
5. a) What type of parameter passing is used in Python? Justify your answer with
sample programs. (7M)
b) Write a Python function that prints all factors of a given number. (7M)
6. a) Write a Python program that overloads + operator, to add two objects of a
class. (7M)
b) How to create, raise and handle user defined exceptions in Python. (7M)
7. a) What are regular expressions? How to find whether an email id entered by user
is valid or not using Python?re? module. (4M)
b) Write a Python program that creates a GUI with a textbox, Ok button and Quit
button. On clicking Ok, the text entered in textbox is to be printed in Python
shell; on clicking Quit, the program should terminate. (10M)
1 of 1
SET – 1
R16
746268 PAPER V - REHABILITATION MEDICINE INCLUDING GERIATRIC MEDICINETHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY…
746268 PAPER V - REHABILITATION MEDICINE INCLUDING GERIATRIC MEDICINETHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY…
746267 PAPER IV - P.T. IN ORTHOPAEDICSTHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY [LN 6267]…
746267 PAPER IV - P.T. IN ORTHOPAEDICSTHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY [LN 6267]…
746266 PAPER III – CLINICAL ORTHOPAEDICSTHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY [LN 6266] AUGUST…
746265 PAPER II – P.T. IN NEUROLOGYTHE TAMIL NADU DR. M.G.R. MEDICAL UNIVERSITY [LN 6265]…