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

Madhan Python Programming-2

Uploaded by

seshanesai
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)
14 views

Madhan Python Programming-2

Uploaded by

seshanesai
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/ 6

Python programming – 2

Name : ESAI SESHAN


Roll No : FCS2425025

QUESTIONS :-
……………………………………………………………………………………

1] Write a python program to count the occurrence of a particular character in a


string.

- input –

-output-

……………………………………………………………………………………
2] Write a simple function to calculate factorial of a number

-input-

-output-

……………………………………………………………………………………

3] Write program to find the summation y=1+x+x^2/2!+x^3/3!+..........x^m/m!

-input-

-output-
……………………………………………………………………………………

4] Write program to find the summation y=1-x+x^2/2!-x^3/3!+..........x^m/m!

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

------------------------------------------------------------------------------------------------

You might also like