Advance Python Question Bank
Advance Python Question Bank
No Questions
1 Define a Class & an Object
2 Define Numpy. Show how to create arrays using Lists
3 Write a function to determine To determine any of the element in array is True:
4 Define Functional Programing
5 Define iterator in python with sample code.
6 Write a Python program to demonstrate Encapsulation
Write a python code to describe the functions ‘reduce’ & ‘total ordering’ function in
7
functools
Generate any 10 random integers between 1 to 100. Sort them in Ascending and
8
Descending order, Display only the Odd Numbers among them.
Mention the various types of Iter Tools. Write a code to demonstrate the Infinite Iter Tools
9
using Count, Cycle iterables
10 Define Inheritence & Polymorphism.
11 Define Arrays in numpy. Show how to create arrays using a Tuple
12 Write a function to determine To determine all the element in array is True:
13 Define Object Oriented Programing
14 Define generator in python with sample code.
Generate any 5 random Decimal between 1 to 100. Sort them in Ascending and
15
Descending order, Display only the Even Numbers among them.
Define the various types of Iter Tools. Write a code to demonstrate the Terminating Iter
16
Tools using dropwhile, takewhile iterables
17 Write a Python program to demonstrate Polymorphism
Write a python code to describe the functions ‘Compare to key’ and ‘reduce’ function in
18
functools
19 Define Object Oriented Programing
20 Define Data Frame & Pandas
21 Describe the functionality of Zip function in Itertools with code
22 Define Functional Programing.
23 Mention the three types of Itertools.
24 Write a Python program to demonstrate Inheritance
25 Write a python code to describe the functions ‘accumulate’ & ‘Chain’ function in itertools
Generate any 10 random integers between 1 to 1000. Demonstrate the use of filter
26 function to extract all the even values and Enumerate function to counts off the elements
in the iterable returning 2-tuples containing the count (from start) and each element.
Mention & Define the two class of funtools. Demonstrate any 3 function with a python
27
code
28 Define a Polymorphism & Encapsulation
29 Write a Python Program for Creating an Object and Class in python
30 Write a function to determine all of the elements in array are True:
Mention the various recursive generators that are used to simplify combinatorial
31
constructs
32 Define Generator in python with sample code.
33 Write a Python program to demonstrate Polymorphism
34 Write a python code to describe the functions ‘islice’ & ‘starmap’ function in itertools
Generate any 10 random integers between 1 to 100.Demonstrate the use of filter function
35
to extract the multiples of 5, Also Enumerate function to.
36 Mention the various types of Functools.
37 Write a code to demonstrate the ‘Partial function’ & ‘Partialmethod class’
38 Define class and object with simple example in python
39 Describe any four attributes in line graph function
40 Give a python code snippet to generate any decimal random number (30,80).
41 Explain generator function with example
42 Explain Infinite iterators with cycle()
43 Define Polymorphism with example.
44 Explain any for attributes of bar graph function
45 Explain the use of send() in generator with example
46 What is iterator? Mention its methods
47 Define functools with example
48 Describe any four attributes in histogram function
49 Explain the use of any() in generator with example
50 Define Inheritance with example.
51 Explain any four attributes of barh function
52 What is Infinite iterators? Write its types
53 Describe generator with example
Create 4 separate list which contain the 5 subjects marks of 4 students and display all the
54
4 list in a single list using chain().
55 Write a python generator to print the multiple of 5 numbers till 60
56 Generate a Fibonacci series using python generater
Suppose there is list of characters “ Good Morning Have a nice day” and you are asked to
57 print only the characters o r n H a c d. Use a appropriate Terminating iterator function to
get this output
Create 4 separate list which contain the 5 subjects marks of 4 students and display all the 4
58
list in a single list using chain.from_iterable function.
59 Write a python generator to sum the first 7 random numbers
Suppose a single list is having 5 tuples, each tuple is having 4 values. Create a new list
60
which contains the minimum number of each tuple by using starmap()
Suppose there is list of characters “ Nothing is Impossible” and you are asked to print only
61
the characters t n g p i e. Use a appropriate Terminating iterator function to get this output
In exam , Ram has scored the following marks 30,45,68,32,28,75 in his 6 subjects. Using
62
appropriate iter tools filterfalse() print the marks which is less than 35.
Write a program to print the successive summation of first 5 random numbers using
63
accumulate()
Suppose Ram is the HR of XYZ company and he want to present the employee salary
details to the director of the Company, for that he need to prepare a presentation . Based
on the data set given help the Ram to provide the following details
Write a program to perform the following operation using seek() and basic file operations.
Open file "Months.txt" in write mode.
Write Months from January to June in a file Months.txt
89 Use seek() to read the content of the file.
Set the pointer to the end of the file and append 'July' and 'August', to the existing file
Month.txt.
Read and print all the content of the file.