Madhan Python Programming-2
Madhan Python Programming-2
QUESTIONS :-
……………………………………………………………………………………
- input –
-output-
……………………………………………………………………………………
2] Write a simple function to calculate factorial of a number
-input-
-output-
……………………………………………………………………………………
-input-
-output-
……………………………………………………………………………………
-input-
-output-
……………………………………………………………………………………
5] Write a python program to accept a list from the user where the input will be
provided separated by space. Try to construct a new list out of it where all the
duplicate entries should be converted to single entry.
-input-
-output-
……………………………………………………………………………………
6] Write a list comprehension to create a list with elements which are square of
elements of input list which is divisible by 3 from an input list L.
-input-
-output-
……………………………………………………………………………………
7] Create a class student with data ‘roll number , name, department and
marks’.Include functions ,student details and update marks apart from in it
function. Create two objects and invoke the functions.
-input-
-output-
……………………………………………………………………………………
8] Program to create a list which is cube of input list.
-input-
-output-
……………………………………………………………………………………
9] Derive from employee class a class typist with an extra data speed of typing.
-input-
-output-
------------------------------------------------------------------------------------------------