Skip to content

// 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.

  1. Question 1

    Part AUnit 1Descriptive2 marks

    Python

    State the qualities of a good algorithm.

    No verified answer or solution is available for this question.

  2. Question 2

    Part AUnit 1Descriptive2 marks

    Python

    Enumerate the strategies involved in developing an algorithm.

    No verified answer or solution is available for this question.

  3. Question 3

    Part AUnit 2Descriptive2 marks

    Python

    What are the rules for writing an identifier?

    No verified answer or solution is available for this question.

  4. Question 4

    Part AUnit 3Descriptive2 marks

    Python

    Mention the types of arguments in Python.

    No verified answer or solution is available for this question.

  5. Question 5

    Part AUnit 3Descriptive2 marks

    Python

    Compare return value and composition.

    No verified answer or solution is available for this question.

  6. Question 6

    Part AUnit 3Descriptive2 marks

    Python

    Define string immutability.

    No verified answer or solution is available for this question.

  7. Question 7

    Part AUnit 4Descriptive2 marks

    Python

    Define cloning in a list.

    No verified answer or solution is available for this question.

  8. Question 8

    Part AUnits 2, 4Descriptive2 marks

    Python

    What is the benefit of using tuple assignment in Python?

    No verified answer or solution is available for this question.

  9. Question 9

    Part AUnit 5Descriptive2 marks

    Python

    How do you delete a file in Python?

    No verified answer or solution is available for this question.

  10. Question 10

    Part AUnit 5Descriptive2 marks

    Python

    How do you use command line arguments to give input to the program?

    No verified answer or solution is available for this question.

  11. Question 11

    Part BUnit 1Descriptive16 marks

    Python

    (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.

  12. Question 12

    Part BUnits 2, 3Descriptive16 marks

    Python

    (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.

  13. Question 13

    Part BUnit 3Descriptive16 marks

    Python

    (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.

  14. Question 14

    Part BUnits 3, 4Descriptive16 marks

    Python

    (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.

  15. Question 15

    Part BUnit 5Descriptive16 marks

    Python

    (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.

Keep preparing

Revisit another year or explore a different paper in the library.

More from this exam