Python Lab Questions
Python Lab Questions
Demonstrate datatypes (int, float, complex, list, tuple, dictionary, bool, bytes, string)
2. Build a program to compute distance between two points, prime numbers between two
given intervals and factorial of a given number.
3. Demonstrate a python code to print try, except and finally block statements. Also
demonstrate IndexError and TypeError.
4. Build a program to guess an integer within a given range and provides hints.
5. Create functions (i)Check whether the given string is palindrome/symmetrical
(ii) calculate the area of the circle and (iii)find the number odd or even.
6. Develop a program to create and manipulate NumPy array with mathematical operations.
7. Implement a simple calculator and perform linear search operations on a list.
8. Build a program to copy content of one file to another and count the total words in the file.
9. Write python programs to implement any 5 built-in functions, any 5 operations on list ,
and any 5 operations on tuple and dictionary operations.
10. Demonstrate matrix addition & transpose operations. Print input arrays and resultant array.
11. Compute square of a given number using anonymous(lambda) function.
12. Demonstrate string slicing, indexing and formatting, interchange first and last element in
the list and convert a list in to tuple and tuple into a list.
13. Display simple Message Box “HELLO WORLD” when button pressed using tkinter.
14. Plot a line graph using matplotlib and label the axes.
15. Construct a program to create and display simple DataFrame using NumPy.