// Anna University, Chennai / 2022
Anna University — Problem Solving and Python Programming (GE3151), April/May 2022
Problem Solving and Python Programming · GE3151 · R2021 · B.E./B.Tech. Engineering (common paper) · Semester 1
Files open in a new tab. Use your browser's download or save option to keep a copy.
Work through the questions
15 questions
No verified answers are available for this paper.
Write an algorithm to find the smallest among three numbers.
No verified answer or solution is available for this question.
Which is better, iteration or recursion? Justify your answer.
No verified answer or solution is available for this question.
List any four built-in data types in Python.
No verified answer or solution is available for this question.
How do you assign a value to a tuple in Python?
No verified answer or solution is available for this question.
What are the purposes of the pass statement in Python?
No verified answer or solution is available for this question.
What is linear search?
No verified answer or solution is available for this question.
Give examples of mutable and immutable objects.
No verified answer or solution is available for this question.
What is the purpose of a dictionary in Python?
No verified answer or solution is available for this question.
List any four file operations.
No verified answer or solution is available for this question.
Write a Python program to count words in a sentence using the split() function.
No verified answer or solution is available for this question.
(a) List out the control flow statements in Python and explain the repetition type in detail with a sample program. (OR) (b) What is recursion? Write and explain a Python program to find the factorial of a number using recursion.
No verified answer or solution is available for this question.
(a) Why do we call Python an interpreted and object-oriented programming language? Also explain interactive Python. (OR) (b) Write and explain the Python program to swap two numbers with and without temporary variables.
No verified answer or solution is available for this question.
(a) What is the difference between break and continue in Python? Explain with suitable examples. (OR) (b) What is a string function in Python? Explain any three Python string methods with an example.
No verified answer or solution is available for this question.
(a) Define Python lists. How do you add elements to a list? Explain with a suitable example program. (OR) (b) Explain the bubble sort algorithm using Python programming.
No verified answer or solution is available for this question.
(a) Why does Python require file handling? Explain opening files in Python with all modes. (OR) (b) Give brief notes on Python exception handling using try, except, raise and finally statements.
No verified answer or solution is available for this question.