Q1) Write a program using function

to count vowels (names) that
returns the total no. of vowels from
a list of names stored in the list

Q2) Write a program to find sum of
the series
1 + x/2! + x2/3! + x3/4! + ……. + xn/

rectangle or .Q3) Write a menu driven program to find the area of a square.

triangle based on user’s choice. .

award() . show() .Q4) Define a class with complete function definitions COMPETITION with following specifications: Class attributes: Event_no as integer Description as string Score as integer Qualified as string Class Methods: Cinput() .

_calcfare() . seatallocate () . ‘D’ for deluxe and ‘S’ for super deluxe  Distance – to store the distance in kilometers  Fare – to store the bus fare Member functions: Constructor. showticket() .Q5) Declare a class Transport in python with the following specifications: Data members:  Busno – To store bus no  Travelfrom – to store name of the destination  Btype – to store bus type such as ‘O’ for ordinary .

Write a method printscholar() that print all details of students that have scored marks greater than 80. name and marks of student. Inherit class scholar that accept all the features of class student and father’s name .Q6) Declare a class student that contains rollno . . It also contains method acceptdata() and dispdata() to accept and print detail .

Q7) Write a menu driven program to sort a list of elements (in ascending order) using bubble sort . . insertion sort . selection sort.



Q8) Write a program to search for an element using linear search method. .

Q9) Write a program to search for an element using binary search method .

.Q10) Write a program to create an array and divide all those element by 5 which are divisible by 5 and multiply their remaining elements by 2.

Q11) Write a program to perform push and pop operation in stack. .

.Q12) Write a program to insert and delete the element in a queue.

Assume that first field of the student records {between rollno and name} .Q13) Write a program to enter students rollno . name and marks into a file called “Student.txt” .

Q14) Write a program to read the contents of .is separated with comma(.).

‘Student. . name and marks fields.txt’ file contains rollno . Assume that first field of the student records {between rollno and name} is separated with a comma(.).

company  Write the code for function camera_add to enter data into ‘CAMERA. .dat’  Write the code for function camera_search() to search for a camera from ‘CAMERA. megapixel .dat’ containing the attributes of camera as given below: Model no . The function should search and display the details of the camera.Q15) A binary file ‘CAMERA.dat’ according to the modelno.


an exception is thrown when the conversion to a number occurs. Note that is the user enter something other than integer .Q16) Write a program to take an integer as user’s input and the program code should use exception handling to capture a possible conversion error . .

Q17) Write a program to generate cube’s of numbers over time. .

Q18) Write a generator function to print Fibonacci series .

.for first 10 numbers.