[go: up one dir, main page]

0% found this document useful (0 votes)
8 views4 pages

Important Questions PWP 22616 Chapterwise

The document consists of a comprehensive set of questions divided into three categories: 2 Marks, 4 Marks, and 6 Marks, covering various chapters on Python programming. Topics include Python syntax, data structures, functions, object-oriented programming, and file handling. Each chapter contains questions that test knowledge on specific concepts, operators, and programming techniques in Python.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Important Questions PWP 22616 Chapterwise

The document consists of a comprehensive set of questions divided into three categories: 2 Marks, 4 Marks, and 6 Marks, covering various chapters on Python programming. Topics include Python syntax, data structures, functions, object-oriented programming, and file handling. Each chapter contains questions that test knowledge on specific concepts, operators, and programming techniques in Python.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

2 Marks Questions

Chapter 1. Introduction and Syntax of Python Program


1) List Python features.
2) Describe indentation in Python.
3) Name different modes of python.
4) How to give single and multiline comment in python.
5) Enlist applications for python programming.

Chapter 2. Python Operators and Control Flow Statements


1) List comparison operators in Python.
2) List identity operators in python.
3) Describe membership operators in python.
4) Describe any two data conversion function.
5) Write the use of elif keyword in python.

Chapter 3. Data Structures in Python


1) Describe Tuples in Python.
2) Give two differences between list and tuple.
3) Enlist any four data structures used in python.
4) Explain two ways to add objects / elements to list.
5) Write syntax for a method to sort a list.
6) What is dictionary?

Chapter 4. Python Functions, Modules and Packages


1) Write use of lambda function in python.
2) Write use of matplotlib package in python.
3) Explain Local and Global variable.
4) State use of namespace in python.

Chapter 5. Object Oriented Programming in Python


1) Write syntax of defining class in Python.
2) Define class and object in python.
3) With neat example explain default constructor concept in Python.
4) Define Data Hiding concept? Write two advantages of Data Hiding.
5) What is data abstraction and data hiding?

Chapter 6. File I/O handling and Exception Handling


1) List file operations in Python.
2) List different modes of opening file in python.
3) Describe mkdir( ) function.
4) State the use of read ( ) and readline ( ) functions in python file handling.
5) Write the syntax of fopen.
4 Marks Questions

Chapter 1. Introduction and Syntax of Python Program


1) List Data types used in python. Explain any two with example.
2) What is command line argument? Write python code to add b) two numbers given as
input from command line arguments and print its sum.
3) Explain building blocks of python.

Chapter 2. Python Operators and Control Flow Statements


1) Explain membership and assignment operators with example.
2) Explain decision making statements If - else, if - elif - else with example.
3) Describe bitwise operators in Python with example.
4) Write python program to illustrate if else ladder.
5) Describe Keyword "continue" with example.
6) Write a Python program to find the factorial of a number provided by the user.
7) Explain Bitwise operator in Python with appropriate example.
8) Explain use of Pass and Else keyword with for loops in python.
9) Write a python program that takes a number and checks whether it is a
palindrome.
10) Write a python program takes in a number and find the sum of digits in a number.
11) Write a program function that accepts a string and calculate the number of uppercase
letters and lower case letters.

Chapter 3. Data Structures in Python


1) Explain four Buit-in tuple functions python with example.
2) Explain indexing and slicing in list with example.
3) Write any four methods of dictionary.
4) Write basic operations of list.
5) Explain creating Dictionary and accessing Dictionary Elements with example.
6) Write Python code for finding greatest among four numbers.
7) Compare list and dictionary.
8) Write a python program to input any two tuples and interchange the tuple variables.
9) Explain different functions or ways to remove key: value pair from Dictionary.
10) Explain four built-in list functions.
11) Compare list and tuple (any four points).

Chapter 4. Python Functions, Modules and Packages


1) Explain how to use user defined function in python with example.
2) Write a program for importing module for addition and substraction of two numbers.
3) Write a program illustrating use of user defined package in python.
4) What are local and global variables? Explain with appropriate example.
5) Explain any four Python's Built-in Function with example.
6) Write python program using module, show how to write and use module by importing it.
7) Explain Numpy package in detail.
8) Explain Panda package in detail.
9) Write a python program to create a user defined module that will ask your program name
and display the name of the program.

Chapter 5. Object Oriented Programming in Python


1) Write a program to create class EMPLOYEE with ID and NAME and display its
contents.
2) Illustrate with example method over loading.

3) Describe 'Self' Parameter with example.


4) Explain method overloading and overriding in python.
5) Write a python program to create class student with roll-no and display its
contents.

Chapter 6. File I/O handling and Exception Handling


1) Explain how try-catch block is used for exception handling in python.
2) Write python program to read contents of abc.txt and write same content to pqr.txt.
3) With neat example differentiate between readline ( ) and readlines( ) functions in file-
handling.
4) Describe various modes of file object? Explain any two in detail.
5) Explain seek ( ) and tell ( ) function for file pointer manipulation in python with example.
6) WAP to read contents of first.txt file and write same content in second.txt file.
7) Explain following functions with example: i) The open( ) function ii) The
write( ) function

6 Marks Questions
Chapter 1. Introduction and Syntax of Python Program
1) Write different data types in python with suitable example.
2) Explain building blocks of python.

Chapter 3. Data Structures in Python


1) Explain mutable and immutable data structures.
2) Write a Python Program to accept values from user in a list and find the largest number
and smallest number in a list.
3) Explain any six set function with example.
4) Explain any four set operations with example.
Chapter 4. Python Functions, Modules and Packages
1) Explain package Numpy with example.
2) Example module. How to define module.
3) Write a Python Program to check if a string is palindrome or not.
4) Write a Python program to calculate sum of digit of given number using function.
5) Write a program illustrating use of user defined package in python.
6) Write a python program to generate five random integers between 10 and 50
using numpy library.

Chapter 5. Object Oriented Programming in Python


1) Explain method overloading in python with example.
2) Write a program to implement the concept of inheritance in python.
3) Design a class student with data members; Name, roll number address. Create suitable
method for reading and printing students details.
4) Create a parent class named Animals and a child class Herbivorous which will extend the
class Animal. In the child class Herbivorous over side the method feed ( ). Create a object
5) Design a class student with data members: name, roll no., department, and mobile no.
Create suitable methods for reading and printing student information.
6) With suitable example explain inheritance in Python.
7) Explain multiple inheritance and write a python program to implement it.

Chapter 6. File I/O handling and Exception Handling


1) Write a program to open a file in write mode and append some contents at the end of file.
2) Explain Try-except block used in exception handling in python with example.
3) Write a Python program to create user defined exception that will check whether the
password is correct or not.
4) Describe various modes of file object. Explain any three in detail.

You might also like