// Anna University, Chennai / 2023
Anna University — Problem Solving and Python Programming (GE3151), April/May 2023
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.
State the qualities of a good algorithm.
No verified answer or solution is available for this question.
Enumerate the strategies involved in developing an algorithm.
No verified answer or solution is available for this question.
What are the rules for writing an identifier?
No verified answer or solution is available for this question.
Mention the types of arguments in Python.
No verified answer or solution is available for this question.
Compare return value and composition.
No verified answer or solution is available for this question.
- 2025
- 2023
Also asked in Anna University — Problem Solving and Python Programming (GE3151), April/May 2025 (2025).
Define string immutability.
No verified answer or solution is available for this question.
Define cloning in a list.
No verified answer or solution is available for this question.
What is the benefit of using tuple assignment in Python?
No verified answer or solution is available for this question.
How do you delete a file in Python?
No verified answer or solution is available for this question.
How do you use command line arguments to give input to the program?
No verified answer or solution is available for this question.
(a) (i) Briefly describe iteration and recursion. Illustrate with an example. (8 marks) (ii) Write an algorithm and give the flowchart to find the net salary of an employee. (8 marks) (OR) (b) (i) Compare machine language, assembly language and high-level language. (8 marks) (ii) Write the pseudocode to (1) find the maximum in a list and (2) solve Towers of Hanoi. (8 marks)
No verified answer or solution is available for this question.
(a) (i) List down the rules for naming variables with examples. (8 marks) (ii) Write a Python program to swap two variables. (8 marks) (OR) (b) (i) What is precedence? List out the order of precedence and demonstrate in detail with an example. (8 marks) (ii) Write a Python program to check whether a given year is a leap year or not. (8 marks)
No verified answer or solution is available for this question.
(a) (i) Explain the string module. (8 marks) (ii) Write a program to find the sum and average of an array of numbers. (8 marks) (OR) (b) Write a program to perform a search operation that sequentially checks each element of the list until a match is found or the whole list has been searched. (16 marks)
No verified answer or solution is available for this question.
(a) Explain in detail about lists, list operations and list slices. (16 marks) (OR) (b) Write a program to generate an electricity bill based on the number of units consumed. Use the rates below. Read the consumption and whether the use is domestic or commercial from the user. (16 marks) Up to 200 units: domestic 200 (base price), commercial 500. More than 200 and fewer than 500 units: domestic 1100, commercial 1700. More than 500 and fewer than 1000 units: domestic 4500, commercial 7000.
No verified answer or solution is available for this question.
(a) (i) Write a function that copies a file, reading and writing up to 50 characters at a time. (8 marks) (ii) Write a Python program to count the number of lines, words and characters in a text file. (8 marks) (OR) (b) Write a Python program to implement stack operations using modules. (16 marks)
No verified answer or solution is available for this question.