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

Python Assignment 4 & 5

The document outlines Python assignments covering topics such as variables, functions, mathematical functions, type conversion, lambda functions, user-defined functions, Numpy package, modules, classes, and exception handling. It includes specific tasks like writing programs for digit sum, factorial, employee class, and inheritance. Additionally, it addresses concepts like data hiding, method overloading, and the 'self' parameter in class definitions.

Uploaded by

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

Python Assignment 4 & 5

The document outlines Python assignments covering topics such as variables, functions, mathematical functions, type conversion, lambda functions, user-defined functions, Numpy package, modules, classes, and exception handling. It includes specific tasks like writing programs for digit sum, factorial, employee class, and inheritance. Additionally, it addresses concepts like data hiding, method overloading, and the 'self' parameter in class definitions.

Uploaded by

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

Python Assignment No.

04, 05
UNIT-4
1. Explain Global and Local Variable. (02)
2. Define function. Write syntax for function. (02)
3. List built-in mathematical functions in python. (02)
4. Define type conversion and list its types. (02)
5. Write the use of lambda function in python. (02)
6. Explain how to use user define function with example.
7. Explain package Numpy with example.
8. Explain Module and its use in python.
9. Write a python program to calculate sum of digit of given number using function.
10.Write a program illustrating use of user defined package in python.
11.Write a python program using module, show how to write and use module by importing it.
12.Difference between local and global variable in python.
13.Write a program to find the factorial of number using math module.

UNIT-5
1) Define class and object in python. (02)
2) Write syntax of defining class in python. (02)
3) Define data hiding concept? Write two advantages of data hiding (02).
4) With neat example explain default constructor concept in python.
5) Write a program to create class Employee with ID and NAME and display its contents.
6) Explain method overloading & overriding in python with example.
7) Write a program to implement the concept of inheritance in python.
8) Explain try-except block used in exception handling in python with example.
9) Design a class STUDENT with data members: Name, Roll_no, Address, Department,
Mobile no. Create suitable method for reading and printing Students details.
10) Create a parent class named ANIMAL and a child class HERBIVOROUS which will
extend the class Animal. In the child class Herbivorous over side the method feed(). Create
an object.
11) Describe ‘self parameter’ with example.

You might also like