CA-504 Python (BBACA) || Question Bank
Question
1. What is the difference between lists and tuples in Python?
2. What are the key features of Python?
3. What type of language is Python?
4. How is memory managed in Python?
5. What is break, continue and pass in Python?
6. What are Python decorators?
7. What is docstring in Python?
8. What is a module and package in Python?
9. How to obtain access to the objects defined in a module with the import statement?
10. How to control package initialization?
11. What are the methods and attributes in a Python class?
12. What are objects in a Python class?
13. What does inheritance means in OOP?
14. How does the Python Static method works?
15. What is Method Overloading?
16. Explain Function overloading with an example.
17. How does Python handles an exception?
18. Differentiate between error and exception.
19. What is Tkinter?
20. Explain Entry Widget Methods.
21. What are Python libraries? Name a few of them.
22. Explain any two libraries used for data visualization.
23. Write a note on statsmodels.
24. Explain any two features of PyTorch.
25. Describe the relationship between Tensorflow and Keras.
26. Do you think that python libraries are the brains of data scientists? Justify your answer.
27. What do you understand by NumPy?
Programs:
1. Write a Python GUI program to create two buttons exit and hello using the Tkinter module.
2. Write a Python GUI program to create three single-line text-box to accept a value from the user using the Tkinter module.
3. Write a Python GUI program to create a simple calculator using the Tkinter module.
4. Define a class named Rectangle which can be constructed by length and breadth. Rectangle class has a method that can compute area and perimeter. Display area a perimeter. Also, delete the object.
5. Write a Python program to create a class Circle and compute the area and circumference of the circle. (Use parameterized constructor)
6. Define a class Student having members roll_no, name, age, and gender. Create a subclass called Test with member marks of 3 subjects. Create three objects of the Test class and display all the details of the student with total marks.
7. Create a class Circle having a member radius. Use operator overloading to add the radius of two circle objects. Also, display the area of a circle.
8. Define a class Person having members- name, address. Create a subclass called Employee with member staffid, and salary. Create 'n' objects of the Employee class and display all the details of the Employee.
9. Write a Python program to create a class that performs basic calculator operations.
10. Write a Python program to multiply all the items in a list.
11. Write a Python program to create a tuple with numbers and print one item.
12. Write a Python program to add a member(s) in a set.
13. Write a Python program to count the number of even and odd numbers from a series of numbers.
14. Write a Python function to find the max of three numbers.
15. Write a Python program to print the numbers of a specified list after removing even numbers from it.
16. Write a Python program that accepts a string and calculates the number of digits and letters.
17. Write a Python program to print the alphabet pattern 'A'.
18. Write a Python program to create and display all combinations of letters, selecting each letter from a different key in a dictionary. Sample data: {'1': ['a','b'], '2': ['c','d']}
19. Write a Python program to calculate the length of a string.
0 Comments