0% found this document useful (0 votes)
2 views

mock_exam

This document is a question paper for the GE8151 - Problem Solving and Python Programming course for B.E./B.Tech students in the first semester, covering various topics related to algorithms, Python programming, and data structures. It consists of two parts: Part A includes 10 short answer questions, while Part B contains 5 detailed questions with options. The exam duration is three hours and the maximum score is 100 marks.

Uploaded by

hamsarevathi4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

mock_exam

This document is a question paper for the GE8151 - Problem Solving and Python Programming course for B.E./B.Tech students in the first semester, covering various topics related to algorithms, Python programming, and data structures. It consists of two parts: Part A includes 10 short answer questions, while Part B contains 5 detailed questions with options. The exam duration is three hours and the maximum score is 100 marks.

Uploaded by

hamsarevathi4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Reg. No.

Question Paper Code : GE8151


B.E./B.Tech. DEGREE EXAMINATION, 2017
First Semester
Computer Science and Engineering

GE8151 - PROBLEM SOLVING AND PYTHON PROGRAMMING

(Common to All Branches)


(Regulations 2017)
Time: Three Hours Maximum: 100 Marks

Answer ALL questions


PART–A (10×2=20 Marks)

1. What is an algorithm?

2. Write a pseudo-code to accept two numbers, add the numbers and print the
result.

3. Outline the modes Python interpreter works.


4. Differentiate between keywords and identifiers.

5. Write a Python program to accept two numbers, find the greatest and print the
result.

6. What is recursion?
7. What is a list in Python? Give example.

8. Write the syntax for concatenating two lists in Python.

9. What is a format operator?

10. Write the syntax for opening a file in Python for reading only.
PART – B (5×16=80 Marks)

11. a) i) Explain with an example the building blocks of an algorithm. (8)


ii) Draw a flow chart to print the first ‘n’ prime numbers. (8)

(OR)

b) Explain with relevant diagrams and algorithm the Towers of Hanoi problem. (16)

12. a i) Explain with an example the structure of a Python program. (6)


ii) Explain different datatypes available in python. (10)
(OR)
b) Explain the various operators available 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)
b) Write Python programs for performing Linear and binary search. (16)

14. a) Write algorithm and program for:


i) Selection Sort (8)
ii) Insertion Sort. (8)

b) Write the Python program to sort an integer list using merge 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)

———————

You might also like