// Anna University, Chennai / 2024
Anna University — Problem Solving and Python Programming (GE3151), April/May 2024
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.
Differentiate algorithm and pseudocode.
No verified answer or solution is available for this question.
Write any two disadvantages of a flowchart.
No verified answer or solution is available for this question.
What is the difference between interactive mode and script mode?
No verified answer or solution is available for this question.
Mention the features of lists in Python.
No verified answer or solution is available for this question.
What is the len function? Give an example of how it is used on strings.
No verified answer or solution is available for this question.
How do you split strings, and what function is used to perform that operation?
No verified answer or solution is available for this question.
What is the range() function and how is it used in lists?
No verified answer or solution is available for this question.
What are the advantages of a tuple over a list?
No verified answer or solution is available for this question.
What is a module and a package in Python?
No verified answer or solution is available for this question.
List a few common exception types.
No verified answer or solution is available for this question.
(a) (i) Explain the steps involved in the program development cycle. (8 marks) (ii) Write the algorithm and pseudocode and draw the flowchart to (1) guess an integer number in a range (4 marks) and (2) solve Towers of Hanoi (4 marks). (OR) (b) (i) Explain the design structures in pseudocode. (8 marks) (ii) Write the algorithm and pseudocode and draw the flowchart to (1) find the sum of the square roots of any three numbers (4 marks) and (2) find the sum of the first 100 integers (4 marks).
No verified answer or solution is available for this question.
(a) Write Python programs to (i) test whether a given year is a leap year (8 marks) and (ii) convert Celsius to Fahrenheit (8 marks). (OR) (b) Write Python programs to (i) find whether a given number is an Armstrong number (8 marks) and (ii) print the Fibonacci series (8 marks).
No verified answer or solution is available for this question.
(a) (i) Explain call by value and call by reference in Python. (8 marks) (ii) How do you perform user input in Python? Explain with an example. (8 marks) (OR) (b) (i) Briefly explain function prototypes. (8 marks) (ii) Write a program to check whether the entered string is a palindrome. (8 marks)
No verified answer or solution is available for this question.
(a) What basic list operations can be performed in Python? Explain each operation with its syntax and an example. (16 marks) (OR) (b) What is a dictionary? Explain Python dictionaries in detail, discussing their operations and methods. (16 marks)
No verified answer or solution is available for this question.
(a) (i) Write a program to enter a number in Python and print its octal and hexadecimal equivalents. (8 marks) (ii) Explain namespaces and scoping in detail. (8 marks) (OR) (b) Explain Python files in detail, including their types, functions and operations that can be performed on files, with examples. (16 marks)
No verified answer or solution is available for this question.