Skip to content
EndsemMay 20242019 patternFE

Programming and Problem Solving (PPS) SPPU Endsem Question Paper May 2024

All 8 questions from this SPPU endsem paper, as printed. Read them here or open the PDF.

Subject code
110005
Pattern
2019 pattern
Exam
Endsem
Session
May 2024
Max. marks
70
Time
2½ Hours
Semester
I/II
Paper code
[6260]-8

Printed for: F.E.

Instructions to the candidates

  1. Solve Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
  2. Neat diagrams must be drawn weherver necessary.
  3. Assume suitable data wherever necessary.

Questions

  1. Q1

    1. a)

      Write a short note on modules and package in python.

      Also asked:May 2025 ·Nov 2024 ·Nov 2023

      [6]
    2. b)

      Explain how we can pass command line arguments in python with a suitable example.

      [6]
    3. c)

      Write a program to check whether a number is Armstrong number or not using a function.

      Also asked:May 2023

      [5]
  2. Q2

    1. a)

      Write syntax of function definition and function call. Give a suitable example for the same.

      [6]
    2. b)

      Explain the following types of function arguments with examples. i) variable length arguments ii) default arguments

      Also asked:Nov 2025 ·May 2025 ·Nov 2023 ·May 2023 ·May 2022

      [6]
    3. c)

      Write a program using lambda function to print a message ‘even’ if number is even and ‘odd’ if number is odd.

      [5]
  3. Q3

    1. a)

      Explain the following string operations with examples. i) concatenation ii) appending iii) string multiplication

      Also asked:Nov 2024 ·May 2022

      [6]
    2. b)

      Explain string formatting operator with suitable example.

      [6]
    3. c)

      Write a program that finds whether a given character is present in a string or not. In case it is present it prints the index in which it is present. Do not use built-in find functions to search it. 2

      [5]
  4. Q4

    1. a)

      Explain string module in python.

      [6]
    2. b)

      Explain following string methods with example. i) split() ii) zfill() iii) replace()

      [6]
    3. c)

      Write a program to reverse a string without using slicing operator.

      [5]
  5. Q5

    1. a)

      Explain the following programming Paradigms in detail. i) Procedural ii) Structured iii) Object Oriented

      Also asked:Nov 2025 ·May 2025 ·Nov 2024 ·Nov 2023 ·May 2023

      [6]
    2. b)

      Differentiate between class variable and object variable.

      Also asked:May 2025 ·Apr 2025 ·Nov 2023 ·May 2022

      [6]
    3. c)

      Write a program to create a class ‘Book’ with members, title, author, publisher, and ISBN number. The functions of the class should read and display the data.

      [6]
  6. Q6

    1. a)

      Explain the following features of OOP i) Classes and Objects ii) Methods and Message Passing iii) Inheritance

      [6]
    2. b)

      Explain class methods with suitable example.

      [6]
    3. c)

      Write a program to calculate area of square and rectangle using a class.

      Also asked:Nov 2025

      [6]
  7. Q7

    1. a)

      What is a file? Explain different Access Modes.

      Also asked:Nov 2024 ·May 2023 ·May 2022

      [6]
    2. b)

      Explain the following file handling methods. i) seek() ii) writelines() iii) readline()

      Also asked:May 2025 ·Nov 2024 ·Nov 2023

      [6]
    3. c)

      Write a program that reads text from a file and writes in into another file but in the reverse order. (Hint: Make the first line in the original file as the last line in the copied file). 3

      [6]
  8. Q8

    1. a)

      Explain the following method with suitable example i) getcwd() ii) rmtree() iii) makedirs()

      [6]
    2. b)

      What is a file path? Explain absolute path and relative path.

      Also asked:Feb 2026 ·May 2025 ·Nov 2024 ·Nov 2023 ·May 2023 ·May 2022

      [6]
    3. c)

      Explain the following dictionary methods. i) fromkeys() ii) setdefault() iii) update()   

      [6]