Reg.No.
:lo e R |
Question Paper Code : 60035
B.E./B.Tech. DEGREE EXAMINA'TIONS, APRIL/MAY HO88
First Semester
Civil Bngineeri1g
GE 3151-PROBLEM SOLVING AND PYTHON PROGRAMMING
(Commonto: All Branche8)
(Regulations 2021)
Time: Three hours Maximun 100 marke
Answer ALL questions
PARTA--(10x2 20 mark8)
1. Write an algorithm to find smallest among three numbers.
2. Which is better iteration or recursion Justily your anéwer
3 List any four built in data types in Python.
4. How do you assign a value to a tuple in Python?
5 What are the purposes of pass statement in Python?
6. What is Linear Search?
7. Give examples for mutable and immutable objedts
8 What is purpose of dictionary in Python?
9. List any four file operations.
10. Write a python program to Count Words in a sentende 1sing spilt 0 funetion
PARTB ( 1 6 B0 mark8)
11. (a) Listout the control flow statements in P'ython and explain repetilion type
in detail with a sample progra
Or
(b) What is recursion? Wrile and oxplain n P'ython progr#m to findl fatorin
of number using recursion
12. (a) Why do we call python as
interpreted and
language? Also explain about object-oriented
Interactive Python programming
Or
(b) Write and explain the python program to swap two
without temporary variables. numbers with and
13. (a) What is difference between break and
continue in Python?
suitable examples. Explain with
Or
(b) What is string function in
Hython? Explain any three Python string
methods with an example.
14. (a) Define Python Lists. How to add elements to the list?
suitable example program. Explain with a
Or
(b) Explain bubble sort
algorithm using Python programming.
15. (a) Why does Python require file handling?
with all modes. Explain opening files in python
(b) Give brief notes on Python
a
and finally statements. xception Handling using try, except, raise