PSPP Five Units QB PDF
PSPP Five Units QB PDF
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
UNIT I
INTRODUCTION TO PROBLEM SOLVING
Introduction - Problem solving and Decomposition - Abstraction - NotationsPseudo code -
Flow chart - Programming language
PART-A
1. Define Computer.
2. Define data and information.
3. List out the basic parts of computer?
4. Define Memory and it types.
5. Write the characteristics of the computer?
6. Define Computational thinking.
7. List out the four basic steps of the problem-solving process?
8. Define Trial and Error.
9. List out any four problem solving techniques?
10. Define Abstraction.
11. Define Notation.
12. Define Pseudocode.
13. List out advantages and disadvantages of pseudocode?
14. List out the steps in problem solving?
15. Define Decomposition.
16. Define Problem decomposition.
17. List out techniques for problem decomposition.
18. Write a pseudocode to find the greatest of two number.
19. Define Flowchart.
20. List out advantage and disadvantage of flowchart.
21. List out the three design structure of flowchart.
22. Define Programming Language.
23. Differentiate between machine language and assembly language.
24. Define Middle level language with example.
25. Write three parts of High-level-programming-language?
1
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
PART-B
1. State computer. Explain basic architecture and characteristics of computer.
2. Explain in detail about problem solving process in computational thinking?
UNIT - II
ALGORITHMIC PROBLEM SOLVING
Algorithm Implementation - Top down design - Simple strategies for developing algorithms -
Iteration - Recursion - Fundamental algorithms - Anticipating and Dealing with Errors
PART-A
1. Define Algorithm.
2. What is the need for algorithm?
3. How does algorithm work?
4. Write any five factors of an algorithm?
5. Write the qualities of a good algorithm?
6. Write the complexity of an algorithm?
7. Define Space complexity.
8. What are the advantages and disadvantages of algorithms?
9. Define top-down design.
10. Define iteration.
11. Define count controlled loop with example.
12. Define sentinel controlled loop with example.
13. Define recursion.
14. Write the features of the algorithm?
15. Why errors are matter in problem solving?
16. List out the types of errors?
2
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
17. Define brute force algorithm.
18. Define Sorting and Searching algorithm.
19. Define Exception Handling.
20. Define debugging.
21. Define syntax error.
22. Define run-time error.
23. Define logical error.
24. Write the common errors to avoid?
25. Define time complexity.
PART-B
1. Explain in detail about algorithm with example and its types ?
2. Explain the factors and qualities of algorithm?
3. How algorithm’s performance and be measured in two ways in detail? (8)
4. Explain hierarchical structure for top-down design with suitable example? (8)
5. Elaborate in detail about simple strategies for developing algorithm?
6. Briefly explain the fundamentals of algorithmic problem solving?
7. Explain in detail about anticipating and dealing with errors?
8. Explain algorithm and its design techniques?
UNIT - III
BASICS BUILDING BLOCKS OF PYTHON
Variables - Immutable variables - Data types - Operators - Python ReservedWords -
Understanding error messages
PART-A
1. Write the characteristics of python?
2. Define python interpreter and it names.
3. List the two modes python interpreter with example
4. Define variables.
5. Define Global and Local variables.
6. Write rules for python variables?
7. Define immutable variables.
8. Define mutable variables.
9. What is the difference between intermediate mode and script mode?
3
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
10. List the standard data types in python.
11. What is meant by python numbers?
12. What are python string?
13. Define list with example.
14. Define string with example.
15. Define operator and operand.
16. List the types of operators.
17. Define floor division.
18. Define Bitwise operator.
19. Define Logical operator.
20. Define python reserved words.[keywords]
21. What are the rules for keywords in python?
22. Define Indentation error.
23. Define Import error.
24. Define python error.
25. List all operators from highest precedence to lowest.
PART-B
1. Explain the data types in python.
2. Ilustrate interpreter and interactive mode in python with example.
3. Write short notes on types of operators in python with appropriate example.
4. Write the following python programs.
a. Exchange the value of two variables.
b. Circulate the value of n variables.
c. Test whether a given year is leap year or not.
d. To find the sum of n natural numbers .
e. To find whether a given number is Armstrong number or not.
f. To print Fibonacci series.
g. To find factorial of a given number
h. To convert Celsius to Fahrenheit.
5. Illustrate about python error messages in detail.
6. Outline with an example the assignment and bitwise operators supported in Python.
7. List various types of keywords in Python and write any 4 types of keywords with
example.
4
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
UNIT - IV
CONTROL STATEMENTS AND STRUCTURED TYPES
Control Flow - Indenting - if Statement - while Loop - break and continue - for Loop - String
- Lists - Tuples - Sets - Dictionaries
PART-A
1. List the categories of control flow statements?
2. Define Indentation.
3. List the types of indent?
4. What is python break statement?
5. What is python continue statement?
6. What are the two operators that are used in string functions?
7. Explain about string slicing with examples.
8. What is the use of str.upper() and str.lower() functions in string?
9. Explain string comparison with an example.
10. What are tuples in Python?
11. What is the difference between tuples and lists in Python?
12. How lists are updated in Python?
13. Write a few methods that are used in Python Lists.
14. What are the advantages of Tuple over List?
15. What are the methods that are used in Python Tuple?
16. Is tuple comparison possible? Explain how with example.
17. What are the built-in functions that are used in Tuple?
18. Explain what is range() function and how it is used in lists?
19. Is tuple are immutable?Explain.
20. Explain what is dictionary and how it is created in Python?
21. How does del operation work on dictionaries? Give an example.
22. What is the difference between modify and copy operations performed in dictionary?
23. Define python sets.
24. How to include duplicate items in a set?
25. List the built in functions with set?
26. How to find the number of elements present in a Set?
27. How to Add and Update Set Items in Python?
28. Write a Program to print weekdays using for loop?
5
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
PART B
1. Answer the following questions.
a. What is String? How do you create a string in Python? (4 marks)
b. How to perform a user input in Python? Explain with example. (4 marks)
c. Write a program to check whether entered string is palindrome or not.(8 marks)
2. Answer the following questions.
a. What is the difference between lists, tuples and dictionaries? Give an example for their
usage. (6 marks)
b. What type of conditional structures is present in a programming language? How
many of them are supported in Python? Explain each with example. (10 marks)
3. What are the basic list operations that can be performed in Python?
Explain each operation with its syntax and example. (16 marks)
4. What is Dictionary? Explain Python dictionaries in detail discussing its operations
and methods.(16 marks)
5. Explain in detail about Control flow structures in python.
6.Brief and explain indentation rules, purpose, types, structure, size, futures and
avoidingerrors in python indentation.
7.Elaborate about conditional statements in detail manner with example.
8. Explain the syntax of the following statements [3+3+3+3+3M]
i) for loop
ii) while loop
iii) if – else
iv) if-elif-else
v) break
9. Estimate about python set elements explain it briefly.
6
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
UNIT - V
FUNCTIONS , MODULES AND FILES
Definition - Hiding redundancy - Arguments and return values - Variable Number of
Arguments - Scope - Passing Functions to a Function - Mapping Functions in a Dictionary -
Lambda function – Recursive Functions - Modules: Standard Modules - OS and SYS
modules - User defined Modules - Importing modules – Writing into a File - Reading from a
File - File Methods
PART-A
1. Define Function.
2. List the types of function parameter?
3. Define data encapsulation.
4. Explain data hiding in python?
5. Write the advantages and disadvantage of data hiding?
6. Define local and global scope for variables.
7. Define recursion with example.
8. Define Higher order function.
9. What is a map() Function?
10. How map() Function Works?
11. Define Lambda function with syntax.
12. Write the difference between with lambda function without lambda function?
13. Define Recursive function.
14. Write the advantage and disadvantage of recursive function?
15. Define user-defined modules in python.
16. Define OS-module in python.
17. Define SYS-module in python.
18. How Files are loaded into Primary Memory?
19. List the file access modes in python?
20. How to read and write a file to text file in python?
21. Write important functions in the SYS modules?
22. How to import python modules?
23. Define void function with example.
24. Write a program to find the factorial of a number using recursion?
25. How to create a user-defined module?
7
SHREE VENKATESHWARA HI-TECH ENGINEERING COLLEGE
(Autonomous)
23CST11- PROBLEM SOLVING AND PYTHON PROGRAMMING
Question Bank
PART-B
1. Explain in detail about Python Files, its types, functions and operations that can be
performed on files with examples.
2. Elaborate data hiding with advantages and disadvantages with suitable example
3. Answer the following questions.
a) What are modules in Python? Explain. (4 marks)
b) Explain in details about namespaces and scoping. (8 marks)
c) Explain about the import statement in modules. (4 marks)
4. Answer the following questions.
a) Define function? Write its syntax.(5 marks)
b) What are formal and actual arguments (5 marks)
c) Write functions to do all arithmetic operations (6 marks)