0% found this document useful (0 votes)
2 views1 page

Python Assignment Question 4th

The document outlines assignment questions for a Python course at New Government Polytechnic, Patna, for the 4th semester. It covers topics such as conditional and looping statements, string and list operations, functions, object-oriented programming, and exception handling. Each section includes explanations and programming tasks for students to complete.

Uploaded by

itel804421
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Assignment Question 4th

The document outlines assignment questions for a Python course at New Government Polytechnic, Patna, for the 4th semester. It covers topics such as conditional and looping statements, string and list operations, functions, object-oriented programming, and exception handling. Each section includes explanations and programming tasks for students to complete.

Uploaded by

itel804421
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NEW GOVERMENT POLYTECHNIC,PATNA -13

SUBJECT- PYTHON

SEMESTER-4nd

ASSIGNMENT QUESTIONS1.
[Link] & Looping Statements
Explain different types of conditional statements in Python (if, if-else, if-elif-
else).
2. String and List Operations
(a) Explain string operations: concatenation, repetition, slicing with
examples.
(b) Write a Python program to:
Count the frequency of each element in a list
Perform linear search on a list
3. Functions in Python
(a) What are user-defined functions? Explain arguments and parameters with
examples.
(b) Write a Python program using a function to calculate factorial of a
number.
(c) Explain the difference between global and local variables.
4. Object Oriented Programming (OOP)
(a) Define class and object with example.
(b) Explain inheritance and its types (single, multiple, multilevel,
hierarchical).
(c) Write a Python program demonstrating method overriding.
5. Exception & File Handling
(a) What is exception handling? Explain try-except-else-finally with
example.

You might also like