Au Coe QP: Question Paper Code
Au Coe QP: Question Paper Code
com
Reg. No. :
QP
(Regulations 2017)
Time : Three Hours Maximum : 100 Marks
1. What is an algorithm ?
E
2. Write a pseudo-code to accept two numbers, add the numbers and print the
CO
result.
5. Write a Python program to accept two numbers, find the greatest and print the
AU
result.
6. What is recursion ?
10. Write the syntax for opening a file in Python for reading only.
www.rejinpaul.com
(OR)
b) Explain with relevant diagrams and algorithm the Towers of Hanoi problem. (16)
QP
b) Explain the various data types in Python. (16)
13. a) i) Write a Python program using while loop to print the first n numbers
divisible by 5. (8)
ii) Write a Python program to compute the factorial of a given number. (8)
(OR)
E
b) Write Python program to perform binary search. (16)
CO
14. a) Write code snippets in Python to perform the following :
i) Accessing elements of a tuple. (5)
ii) Modifying elements of a tuple. (5)
iii) Deleting elements of a tuple. (6)
(OR)
AU
b) Write the Python program to sort an integer list using selection sort. (16)
15. a) Describe in detail how exceptions are handled in Python. Give relevant
examples. (16)
(OR)
b) Write a Python program to copy the contents of one file to another. (16)
———————