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
- Solve Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
- Neat diagrams must be drawn weherver necessary.
- Assume suitable data wherever necessary.
Questions
Q1
- a)[6]
- b)[6]
Explain how we can pass command line arguments in python with a suitable example.
- c)[5]
Write a program to check whether a number is Armstrong number or not using a function.
Also asked:May 2023
ORQ2
- a)[6]
Write syntax of function definition and function call. Give a suitable example for the same.
- b)[6]
Explain the following types of function arguments with examples. i) variable length arguments ii) default arguments
- c)[5]
Write a program using lambda function to print a message ‘even’ if number is even and ‘odd’ if number is odd.
- a)
Q3
- a)[6]
Explain the following string operations with examples. i) concatenation ii) appending iii) string multiplication
- b)[6]
Explain string formatting operator with suitable example.
- c)[5]
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
OR- a)
Q4
- a)[6]
Explain string module in python.
- b)[6]
Explain following string methods with example. i) split() ii) zfill() iii) replace()
- c)[5]
Write a program to reverse a string without using slicing operator.
- a)
Q5
- a)[6]
Explain the following programming Paradigms in detail. i) Procedural ii) Structured iii) Object Oriented
- b)[6]
Differentiate between class variable and object variable.
- c)[6]
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.
OR- a)
Q6
- a)[6]
Explain the following features of OOP i) Classes and Objects ii) Methods and Message Passing iii) Inheritance
- b)[6]
Explain class methods with suitable example.
- c)[6]
Write a program to calculate area of square and rectangle using a class.
Also asked:Nov 2025
- a)
Q7
- a)[6]
- b)[6]
Explain the following file handling methods. i) seek() ii) writelines() iii) readline()
- c)[6]
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
ORQ8
- a)[6]
Explain the following method with suitable example i) getcwd() ii) rmtree() iii) makedirs()
- b)[6]
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
- c)[6]
Explain the following dictionary methods. i) fromkeys() ii) setdefault() iii) update()
- a)