PWP Uniwize QB

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

ZEAL EDUCATION SOCIETY’S

ZEAL POLYTECHNIC, PUNE


NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

Unit 1: INTRODUCTION AND SYNTAX OF PYTHON PROGRAM (08 MARKS)


2 Marks
1. Explain numeric data types in Python.
2. Differentiate between interactive mode and script mode of Python.
3. List different Object Oriented Features supported by Python.
4. Describe Python Interpreter.
5. Enlist applications for Python programming.

4 Marks
1. Explain any 4 features of Python programming
2. Write steps to install Python and to run Python code.
3. List and Explain different data types used in Python.
4. Describe the role of indentation in Python.
5. Define the following terms:
i. Identifier
ii. Literal
iii. Keyword
iv. Variable
6. List the features of Python and explain any two.
7. What do you mean by variable? Does Python allow explicit declaration of variables? Justify
your answer.
8. What is comment? How to apply comments in Python?
9. Explain numeric data-types in Python.
10. Explain the use of strings in Python. Also explain ‘+’ and ‘*’ w. r. t. string.
ZEAL EDUCATION SOCIETY’S
ZEAL POLYTECHNIC, PUNE
NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

Unit 2. PYTHON OPERATORS AND CONTROL FLOW STATEMENTS (10 MARKS)


2 Marks
1. Write Syntax of if-else and if-elif -else statement in Python.
2. State the use of keyword pass.
3. List and write the use of Identity Operators
4. Write the syntax of while loop and for loop.
5. Explain continue and break statement with syntax.
6. List and write the use of membership operators in Python.
4 Marks
1. Explain logical and bitwise operators in Python with appropriate example.
2. Explain relational and arithmetic operators in Python with examples.
3. Write a Python program to print factorial of a number. Take input from user.
4. Write a Python program to print Fibonacci series up to n terms.
5. Write a Python program to check whether given Number is even or odd.
6. Explain arithmetic operators in Python with an example.
7. Explain bitwise operators in Python with an example.
8. Explain membership operator and identity operators in Python with examples.
9. Explain if-else statement with example.
10. Show the use of keyword elif in Python with example.
11. How to use short-hand if-else statement in Python. Explain with example.
12. Explain for-loop in Python with example.
13. Can we use keyword else with any loop? Justify your answer.
14. State the use of keyword pass.
15. Explain the use of keywords break and continue in Python.
ZEAL EDUCATION SOCIETY’S
ZEAL POLYTECHNIC, PUNE
NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

Unit 3. DATA STRUCTURE IN PYTHON (14 MARKS)


2 Marks
1. Can we delete list elements? Justify your answer.
2. Define tuple in Python? How to create and access it?
3. Compare list and tuple.
4. Enlist built in function in dictionaries and explain any two.
5. Explain any two built in methods of set in Python with example.
6. Can we delete the list element?
7. Explain the use of keywords del w.r.t list.
4 Marks
1. Describe basic operations perform on list with example.
2. Explain any four built in methods of lists in Python with example.
3. Explain the basic operations that can be performed on tuple.
4. Enlist built in function in tuple and explain any four.
5. Explain the basic operations that can be performed on set in Python with suitable example
6. Explain the basic dictionaries operations with an example.
7. How to declare the list? Can we change or update the list elements? Justify your answer.
8. Write a short note on slicing list.
9. Explain the following function w.r.t list a) append() b) insert()
10. How to declare the tuple? Can we change or update the tuple? Justify your answer.
11. How to declare the set? Can we change iterate through set by using while loop? Justify
your answer.
12. Can we iterate through set by using for loop? Justify your answer.
13. Can we add new elements in set? Justify your answer with example.
14. Explain the following set operations
a) Set union b) Set intersection c) Set symmetric difference
15. How to declare the dictionary in Python?
16. Explain different ways and function to remove key:value pair from dictionary
ZEAL EDUCATION SOCIETY’S
ZEAL POLYTECHNIC, PUNE
NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

4. PYTHON FUNCTIONS, MODULES AND PACKAGE (14 MARKS)


2 Marks
1. Describe User-defined Function in Python.
2. Define Module in Python? How to create a module and use it.
3. Write different types of arguments in a function.
4. Explain from...import statement.
5. Shows the use of reduce function with an example.
6. State the use of keyword global with simple example.
7. Explain Data Conversion functions in Python.
8. Can Python function return the value? Justify your answer with example.
4 Marks
1. Define Package? Write the steps to create a package in Python?
2. Explain type conversion of variable in Python. Explain any four data conversions functions.
3. Write a function that takes single character and prints “character is vowel‟ if it is vowel,
“character is not vowel‟ otherwise.
4. Write a Python program to calculate factorial of given number using recursive function.
5. Write a Python program to find reverse of a given number using user defined function.
6. Explain the following package with suitable example.
i) numpy ii) scipy iii) pandas iv) matplotlib
7. Explain Python built in module.
i) Numeric and Mathematical Module.
ii) Functional Programming Module
8. Define function. How to create user-defined function in Python?
9. Explain the concept of parameter passing to Python function.
10. Can Python function return the value? Justify your answer with example.
11. Define and explain local variables and global variables with suitable examples.
12. Write a Python program to demonstrate variable length arguments. Also explain that program.
13. How to create the module in Python?
14. Explain Python built-in module: random
15. Explain use of lambda expression with example.
17. Explain the use map function with example.
18. Write a program to create bar chart using matplotlib
ZEAL EDUCATION SOCIETY’S
ZEAL POLYTECHNIC, PUNE
NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

Unit 5. OBJECT ORIENTED PROGRAMMING IN PYTHON (12 MARKS)


2 Marks
1. Define class? How to create an class and its object in Python.
2. State the use of parameter “self” in Python class.
3. Differentiate between method overloading and method overriding.
4. Explain Destructor in Python.
5. Describe Data Hiding.
6. Explain constructor function in Python class with example.
4 Marks
1. Write a program to demonstrate parameterized constructor in base class and derived class
2. Write a program to demonstrate constructor with default arguments.
3. Write a program to create a Python class and delete object of that class using del keyword.
4. Explain inheritance in Python with example.
5. Create a class employee with data members: name, department and salary. Create suitable
methods for reading and printing employee information.
6. Explain data abstraction in detail.
7. Describe term composition classes with example.
8. What is class? How to declare class in python?
9. State the use of parameter ‘self’ in python class.
10. Explain constructor function in python class with example.
11. Can we overload constructor function in python? Justify your answer.
12. Can we call constructor and destructor function manually in python? Justify your
answer.
13. Write a program to demonstrate parameterized constructor in base class and derived
class.
14. How to create abstract method in python? Explain with example.
15. Python dose not allowed method overloading. Then explain alternate ways of
achieving the similar effect of overloading.
16. Write a short note on method overriding in python.
ZEAL EDUCATION SOCIETY’S
ZEAL POLYTECHNIC, PUNE
NARHE │PUNE -41 │ INDIA
COMPUTER ENGINEERING DEPARTMENT
Course: - Programming with Python 22616

Unit wise Question Bank

Unit 6. FILE I/O HANDLING AND EXCEPTION HANDLING (12 MARKS)


2 Marks
1. List four file modes in Python.
2. Explain open() and close() methods for opening and closing a file.
3. Write use of try: finally block with Syntax.
4. Describe print() functions with example.
5. Give the syntax and significance of input() method.
6. State the use of read() and readline() function in Python file handling mechanism.
7. State the use of write() and writeline() function in Python file handling mechanism.
4 Marks
1. Explain with an example, how to rename or delete File or Directory.
2. Explain exception handling with example using try, except, raise keywords.
3. Explain how to create a user defined exception with an example.
4. Write a Python program which will throw exception if the value entered by user is less than
zero.
5. Write a Python program to read contents of first.txt file and write same content in second.txt
file.
6. Explain following Python functions:
i. getcwd() ii. mkdir() iii. chdir() iv. listdir()
7. Explain print() function with its arguments.
8. Explain following file related operations:
a) Opening a file b) writing into a file using write() function
c) reading from a file using readline() function
9. How to create user defined exception and raise it manually? Explain with example.
10. Explain following python function w.r.t Dictionary.
a) getcwd() b) mkdir() c) chdir() d) listdir() e) exist()
11. Explain rename() and remove() function w.r.t Dictionary.
12. Explain use of try : except block with example.
13. Write a program to demonstrate try with multiple exception.
14. Explain except: block without any exception name to it.
15. Can a single except: block handle multiple exception.
16. How to manually raise an exception? Explain with example.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy