Skip to content
SmartFigureEduExam kits ₹19

GE3151 · QP 30509 · Nov/Dec 2022

GE 3151 Problem Solving and Python Programming question paper, November/December 2022

GE3151 exam kitRepeated questions + all papers, 1 PDF

Exam kit

Needed by the payment gateway. Not shared or used for marketing.

Secure payment by Cashfree Payments (UPI, cards, net banking). One-time payment, no subscription. The payment page may show StrangerYaar, the business that processes payments for SmartFigure.Terms · Refunds

Question Paper Code : 30509

B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2022.

First Semester

Civil Engineering

GE 3151 — PROBLEM SOLVING AND PYTHON PROGRAMMING

(Common to : All Branches)

(Regulations 2021)

Time : Three hoursMaximum : 100 marks

Answer ALL questions.

PART A — (10 × 2 = 20 marks)

  1. 1.

    Write an algorithm to find the sum of first 'N' natural numbers.

  2. 2.

    Distinguish between top down and bottom up approaches to design an algorithm.

  3. 3.

    What is slicing operator in python? Give an example.

  4. 4.

    Python variables do not have specific types. Justify this statement using an example.

  5. 5.

    Write a python program to add two matrices.

  6. 6.

    Write a simple function to multiply two numbers in python.

  7. 7.

    Write a program to create a clone of the list: list 1 = [1,2,3,4,5,6].

  8. 8.

    How are the values of tuples accessed? Illustrate with an example.

  9. 9.

    Define relative path and absolute path with respect to files.

  10. 10.

    What are exceptions?

PART B — (5 × 16 = 80 marks)

  1. 11.
    (a)
    • (i)Explain the different building blocks of algorithms with their notations.(10)
    • (ii)Write an algorithm to find an element in the given set of numbers.(6)
  2. Or
  3. (b)
    • (i)What is meant by recursion? Write a recursive algorithm to solve Towers of Hanoi problem.(8)
    • (ii)Draw a flowchart to check if the given word is palindrome.(8)
  4. 12.
    (a)
    • (i)Write a program to find the roots of a quadratic equation given the coefficients a, b, c.(8)
    • (ii)Describe the shift and logical operators used in python with examples.(8)
  5. Or
  6. (b)
    • (i)Elaborate on membership, identity and bitwise operators of python with suitable examples.(12)
    • (ii)Write a program to print the digit at one's place of a number.(4)
  7. 13.
    (a)
    • (i)Describe the conditional branching statements of python with examples.(8)
    • (ii)Write the syntax of while loop and use the same to classify if a given number is prime or not.(8)
  8. Or
  9. (b)
    • (i)Describe parameter passing in functions using examples.(8)
    • (ii)Discuss about the scope and lifetime of variables considering functions.(8)
  10. 14.
    (a)
    • (i)Describe the addition and deletion operation in a list data structure with examples.(8)
    • (ii)Write a program that has a nested list to store topper details and display the details.(8)
  11. Or
  12. (b)
    • (i)Discuss the basic tuple operations with examples.(8)
    • (ii)Write a program to swap two values using tuple assignment.(8)
  13. 15.
    (a)
    • (i)Explain opening and closing of files in python using examples.(8)
    • (ii)Write a program to display the contents of a file by performing split operation whenever a comma is encountered in a file.(8)
  14. Or
  15. (b)
    • (i)Explain the use of packages and modules in python with examples.(8)
    • (ii)Write a program to handle the division by zero exception.(8)

Other GE3151 papers