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

Index Python

The document outlines a comprehensive list of tasks and questions related to Python programming, covering various topics such as data types, control structures, functions, classes, and file handling. It includes requests for code examples, explanations of concepts, and comparisons between different data structures. The tasks are categorized by complexity and include both theoretical and practical programming exercises.

Uploaded by

pratiksingh6005
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)
3 views

Index Python

The document outlines a comprehensive list of tasks and questions related to Python programming, covering various topics such as data types, control structures, functions, classes, and file handling. It includes requests for code examples, explanations of concepts, and comparisons between different data structures. The tasks are categorized by complexity and include both theoretical and practical programming exercises.

Uploaded by

pratiksingh6005
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/ 4

1. Enlist applications for Python programming.

(1A)

2. Describe the role of indentation in Python. (1A)

3. Explain building blocks of Python. (1A)

4. List features of Python. (1D)

5. Describe any two data conversion functions. (1E)

6. Write the use of elif keyword in Python. (1J)

7. Explain membership and identity operators in Python. (1J)

8. Write a Python program to display the following output: (1K)

468

10 12 14 16 18

9. Explain the use of pass and else keywords with for loops in Python. (1K)

10. Describe membership operators in Python (any four points). (1L)

11. Describe the keyword continue with an example. (1L)

12. Write a Python Program to find the factorial of a number provided by the user. (1M)

13. Explain Bitwise operator in Python with appropriate example (1M)

14. Write a Python Program to check if a string is palindrome Or not (2A)

15. List comparison operators in Python. (2A)

16. Describe bitwise operators in Python with an example. (2B)

17. Write a Python program to illustrate an if-else ladder. (2B)

18. Write Python code for finding the greatest among four numbers (2B)

19. List identity operators in Python. (2B)

20. Write a program to print the following pattern: 1 1 2 1 2 3 1 2 3 4 (2B)

21. Explain membership and assignment operators with examples. (2C)

22. Explain decision-making statements if-else, if-elif-else with examples. (2C)

23. Explain two ways to add objects/elements to a list. (2E)

24. Explain four built-in list functions. (2E)

25. Explain different functions or ways to remove a key-value pair from a dictionary. (2G)

26. Explain any four set operations with examples. (2H)

27. List and explain any four built-in functions on sets. (2I)
28. Write down the output of the following Python code: python indices = ['zero', 'one', 'two',
'three', 'four', 'five'] i) indices[:4] ii) indices[:-2] (2K)

29. Explain creating a dictionary and accessing dictionary elements with an example. (2K)

30. Explain any four Python built-in functions with examples. (2L)

31. Write a python program to input any two tuples and interchange the tuple variables. (2N)

32. Differentiate between lists and tuples. (2N)

33. Write a Python program to accept values from the user in a list and find the largest and
smallest numbers in the list. (2O)

34. Explain any six set functions with examples. (20)

35. Describe tuples in Python. (3A)

36. Write any four methods of dictionaries. (3A)

37. Explain basic operations of lists. (3C)

38. Compare lists and dictionaries (any four points). (3E)

39. Explain any four file modes in Python. (1A)

40. Write a Python program to perform the following operations on a set: (3F)

41. Create a set (3F)

42. Access set elements (3F)

43. Update the set (3F)

44. Delete elements from the set (1A)

45. Give two differences between lists and tuples. (3I)

46. Explain four built-in tuple functions in Python with examples. (3I)

47. Explain indexing and slicing in lists with examples. (3K)

48. Explain Module and its use in Python (3P)

49. Write a Python program to calculate sum of digit of given number using function. (1A)

50. Write the use of the lambda function in Python. (3P)

51. What are local and global variables? Explain with an appropriate example. (3P)

52. Explain how to define a module. (3P)


53. Explain how to use user-defined functions in Python with an example. (1A)

54. Write a program for importing a module for addition and subtraction of two numbers. (1A)

55. Explain the use of the format() method with an example. (3R)

56. Write a program illustrating use of user defined package in python (3R)

57. Explain package NumPy with example. (3S)

58. Define the concept of data hiding. Write two advantages of data hiding. (3T)

59. Explain method overloading and overriding in Python. (4A)

60. Write a program to create a class Student with roll number and name and display its
contents. (4B)

61. Write a program to implement the concept of inheritance in Python. (4B)

62. With a neat example, explain the default constructor concept in Python. (4C)

63. Describe the self parameter with an example. (4C)

64. Design a class Student with data members: name, roll number, department, and mobile
number. Create suitable methods for reading and printing student information. (4D)

65. With a suitable example, explain inheritance in Python. (4E)

66. Write the syntax of defining a class in Python. (4F)

67. What is a command-line argument? Write Python code to add two numbers given as input
from command-line arguments and print their sum. (4F)

68. Create a parent class named Animal and a child class Herbivorous that extends the
class Animal. Override the method feed() in the child class. Create an object. (4G)

69. Define class and object in Python. (4G)

70. Write a program to create a class EMPLOYEE with ID and NAME and display its contents. (4H)

71. Explain method overloading in Python with an example. (4H)

72. State the use of read() and readline() functions in Python file handling. (4H)

73. Describe various modes of file objects. Explain any two in detail. (4I)

74. Explain seek() and tell() functions for file pointer manipulation in Python with examples. (4J)
75. WAP to read contents of first.txt file and write same content in second.txt file (4J)

76. With neat example differentiate between readline () and readlines () functions in file-
handling. (4K)

77. Write a program to show a user-defined exception in Python. (4K)

78. List file operations in Python. (1L)

79. Explain how try-catch block is used for exception handling in python (4L)

80. Write python code to count frequency of each characters in a given file (4M)

81. Write python program to read contents of abc.txt and write same content to pqr.txt (4N)

82. List different modes of opening file in Python (4N)


83. Write a program to open a file in write mode and append some content at the end of file
(4N)

You might also like