0% found this document useful (0 votes)
30 views

Assignments

Uploaded by

Yuvraj More
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Assignments

Uploaded by

Yuvraj More
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

UNIT I [08 Marks]

Introduction and Syntax of Python Program

1) List the features of python and explain any two.

2) What do you mean by variable? Does python allow explicit declaration of variables?

Justify your answer.

3) What is comment? How to apply comments in python?

4) Explain numeric data-types in python.

5) Explain the use of strings in python. Also explain ‘+’ and ‘*’ w. r. t. string.
UNIT II [10 Marks]
Python Operators and Control Flow Statements

1) Explain arithmetic operators in python with an example.

2) Explain bitwise operators in python with an example.

3) Explain membership operator and identity operators in python with examples.

4) Explain if-else statement with example.

5) Show the use of keyword elif in python with example.

6) How to use short-hand if-else statement in python. Explain with example.

7) Explain for-loop in python with example.

8) Can we use keyword else with any loop? Justify your answer.

9) State the use of keyword pass.

10) Explain the use of keywords break and continue in python.


UNIT III [14 Marks]
Data Structures in Python
1. How to declare the list? Can we change or update the list elements? Justify your answer.

2. Write a short note on slicing list.

3. Explain the following function w.r.t list

a) append() b) insert()

4. Can we delete the list element?

5. Explain the use of keywords del w.r.t list.

6. How to declare the tuple? Can we change or update the tuple? Justify your answer.

7. How to declare the set? Can we change iterate through set by using while loop? Justify

your answer.

8. Can we iterate through set by using for loop? Justify your answer.

9. Can we add new elements in set? Justify your answer with example.

10. Explain the following set operations

a) Set union b) Set intersection c) Set symmetric difference

11. How to declare the dictionary in python?

12. Explain use of update() function w.r.t dictionary.

13. Explain how to access dictionary element using index/key with example.

14. Explain different ways and function to remove key:value pair from dictionary
UNIT IV [14 Marks]
Python Functions, Modules and Packages
1. Define function.

2. How to create user-defined function in python.

3. Explain the concept of parameter passing to python function.

4. Can python function return the value? Justify your answer with example.

5. Define and explain local variables and global variables with suitable examples.

6. Write a short note on: Functions with default arguments.

7. What is kwargs in python? Explain its use.

8. Does the python allow the nested function definitions? Justify your answer.

9. Write a python program to demonstrate variable length arguments. Also explain

that program.

10. Explain the following built in functions.

a) all() b) hasattr() c) oct() d) eval() e) issubclass ()

11. Explain any four data conversions functions in python.

12. Explain input() and print() functions in python .

13. How to create the module in python?

14. Explain from……import statement.

15. Explain python built-in module: random

16. 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.


UNIT V [12 Marks]
Object Oriented Programming in Python

1. What is class? How to declare class in python?

2. State the use of parameter ‘self’ in python class.

3. Explain constructor function in python class with example.

4. Can we overload constructor function in python? Justify your answer.

5. Can we call constructor and destructor function manually in python? Justify your

answer.

6. Write a program to demonstrate parameterized constructor in base class and derived

class.

7. How to create abstract method in python? Explain with example.

8. Python dose not allowed method overloading. Then explain alternate ways of

achieving the similar effect of overloading.

9. Write a short note on method overriding in python.

10. Explain the use _str_() and _repr()function in Python.

You might also like