You are on page 1of 3

Question Bank for PPS Prelim.

Exam

1 Explain any two standard libraries.

2 What is function? Explain with example. What is a need of function?

3 What is docstring? Explain good programming practices in brief.

4 Explain variable scope and lifetime with example. Refer below code, what will be the

Output and explain it in detail

def function1(numbers):
total =0
for c in numbers:
total += x
return total
print(function1((8,2,3,0,7)))

5 Explain any three built-in functions of python with example.

6 Write a python function to return a reverse of a string

7 Explain Following string operations with example:

8 Concatenation of string

9 Repetition of string

10 Slice operation of string

11 Appending of string

12 Explain various ways to formatting a string with example.

13 Write Python program to calculate length of string

14 Explain different ways to iterate a string with example.


15 Write short note on string module.

16 Write a Python program to count the occurrences of each Word in a given sentence

17 Explain various programming paradigm in details.

18 Explain following terms in detail

a) Class b) Method c) Object

19 Explain single inheritance with example.

20 Write a python program for student database management. Program should include

Following functions.

i. Adding a student

ii. Deleting a student

iii. Updating student information

21 Explain access specifier with example.

22 Explain __init__ method with example.

23 Explain any three dictionary methods with example.

24 Define files and enlist types of files. Also explain absolutes and relative file path

25 Write a program to open and read contents of a file.

26 Define dictionary with syntax. Also explain two methods to remove an item from

dictionary.

27 Explain file modes in details.

28 Write a python program to read lines method and write lines method

29 What do you mean by function. Mention the advantages of using function.

30 Explain various ways of calling functions with suitable example?

31 Write a python program using function for creating simple calculator?

32 Explain the concept of local and global variable in python?


33 How will you define function in python? Give suitable example.

34 Write short note on 1. Anonymous function 2. Good programming practices

35 Explain the concept of string used in python?

36 Justify the statement- “Strings are immutable”

37 Short note on. ord(), chr() function along with in not in operator.

38 Explain the operations- Concatenation and appending of string with necessary illustration.

39 Write a python program to accept string and display reverse string and palindrome

40 What are different format operators.

41 What is monolithic programming? Give Advantages and Disadvantages of it.

42 Differentiate between procedural and object oriented programming approach.

43 How to create class and object? Explain with suitable example.

44 What is object oriented programming? Give Advantages and Disadvantages of it.

45 Explain different features of OOP. (All)

46 Write a python program to create a class ‘Rectangle’. Also find the area and perimeter o

the Rectangle when length and breadth values are initiated.

47 Define file. Explain different types of file. Give significance of with keyword?

48 Explain various file access modes in which file can be open.

49 Write a program in python to count number of vowels and consonants present in the text file

50 Differentiate between- i. Absolute file path and Relative file path ii. File and Folder

51 What is file object attributes? Explain it with Python program.

52 Explain the different directory methods used in os module.

You might also like