MODEL QUESTIONS OF PYTHON (BCA-II) - 2024

 MODEL QUESTIONS OF PYTHON - 2024

UNIT-I

1.     What is Python?

2.     What are some key features of Python?

3.     How is Python different from other programming languages?

4.     What is the Python interpreter?

5.     How does the Python interpreter execute Python code?

6.     What is Jupyter Notebook?

7.     How do you create a new code cell in Jupyter Notebook?

8.     How do you execute code in a Jupyter Notebook?

9.     Why is indentation important in Python?

10.  What is the standard indentation level in Python?

11.  Can you mix spaces and tabs for indentation in Python?

12.  How do you write single-line comments in Python?

13.  How do you write multi-line comments in Python?

14.  How do you import a module in Python?

15.  What is the difference between `import module` and `from module import *`?

16.  What are binary operators in Python?

17.  Provide examples of some binary operators in Python.

18.  What are scalar data types in Python?

19.  List some examples of standard scalar data types in Python.

20.  What is type casting in Python?

21.  How do you perform type casting in Python?

22.  What is an if-else statement?

23.  Provide an example of an if-else statement in Python.

24.  What is a loop?

25.  What is the difference between a while loop and a for loop in Python?

26.  What is the `pass` statement in Python?

27.  When would you use the `pass` statement?

28.  What is the `range` function in Python?

29.  How do you use the `range` function in a for loop?

30.  What is a ternary expression?

31.  Provide an example of a ternary expression in Python.

 

UNIT- II

 

32.  What are data structures in Python?

33.  Provide examples of built-in data structures in Python.

34.  What is a tuple in Python?

35.  How do you create a tuple?

36.  Can you modify a tuple after it's created?

37.  What is a list in Python?

38.  How do you create a list?

39.  What is slicing in Python?

40.  Name some built-in functions for sequences in Python.

41.  Provide examples of how to use built-in sequence functions.

42.  What is a dictionary in Python?

43.  How do you create a dictionary?

44.  What are the key-value pairs in a dictionary?

45.  What is a set in Python?

46.  How do you create a set?

47.  What are the characteristics of a set?

48.  What are comprehensions in Python?

49.  Provide examples of list, set, and dictionary comprehensions.

50.  How do comprehensions improve code readability and conciseness?

51.  What is a namespace in Python?

52.  What is the scope of a variable in Python?

53.  What are local functions in Python?

54.  Can a Python function return multiple values?

55.  How do you return multiple values from a function?

56.  Provide an example of a function returning multiple values.

 

UNIT- III

57.  What is a function in Python?

58.  How do you define a function in Python?

59.  What is the purpose of using functions in programming?

60.  What is a lambda function in Python?

61.  How do you define a lambda function?

62.  Provide an example of when you might use a lambda function.

63.  What is partial argument application in Python?

64.  How do you apply partial arguments to a function in Python?

65.  Can you provide an example of partial argument application?

66.  What is a generator in Python?

67.  How do you define a generator function?

68.  Explain the difference between using a generator and a list in terms of memory usage.

69.  What is an object in Python?

70.  What are methods in Python?

71.  How do you call a method on an object in Python?

72.  What is NumPy?

73.  How do you create a one-dimensional array using NumPy?

74.  Provide an example of creating a multi-dimensional array using NumPy.

75.  How does NumPy handle arithmetic operations with arrays?

76.  Can you perform element-wise addition on two NumPy arrays?

77.  Explain broadcasting in the context of NumPy arrays.

78.  What is indexing in NumPy arrays?

79.  How do you access elements of a NumPy array using indexing?

80.  Explain slicing in NumPy arrays.

81.  What is pseudorandom number generation?

82.  How do you generate pseudorandom numbers using NumPy?

83.  Provide an example of generating pseudorandom numbers with specific distributions using NumPy.

 

UNIT- IV

84.  What is Pandas?

85.  Why is Pandas used in data analysis?

86.  Name some key features of Pandas.

87.  What is a Series in Pandas?

88.  What is a DataFrame in Pandas?

89.  How are Series and DataFrames different?

90.  How do you read data from a CSV file into a DataFrame using Pandas?

91.  Provide an example of reading a CSV file using Pandas.

92.  How do you display the first few rows of a DataFrame?

93.  How do you display the last few rows of a DataFrame?

94.  What does the `info()` function do in Pandas?

95.  How do you get the shape of a DataFrame?

96.  What does the `columns` attribute return in Pandas?

97.  How do you check for missing values in a DataFrame?

98.  How do you drop rows with missing values in a DataFrame?

99.  How do you compute the mean of a DataFrame?

100.                 How do you compute the sum of values in a DataFrame?

101.                 What does the `describe()` function do in Pandas?

102.                 How do you count the occurrences of unique values in a column of a DataFrame?

103.                 What does the `corr()` function do in Pandas?

104.                 What is the difference between `loc[]` and `iloc[]` in Pandas?

105.                 How do you apply a function to a DataFrame or Series in Pandas?

 

UNIT- V

106.                 What is Matplotlib?

107.                 Why is Matplotlib used in Python?

108.                 Name some key features of Matplotlib.

109.                 How do you create a basic plot using Matplotlib?

110.                 Provide an example of plotting a simple line graph using Matplotlib.

111.                 What are subplots in Matplotlib?

112.                 How do you create subplots in Matplotlib?

113.                 Provide an example of creating multiple subplots in a single figure.

114.                 What are line plots?

115.                 How do you create a line plot using Matplotlib?

116.                 Provide an example of plotting a line graph with labeled axes and a title.

117.                 What are bar plots?

118.                 How do you create a bar plot using Matplotlib?

119.                 Provide an example of plotting a bar graph with labeled bars and a legend.

120.                 What are histograms?

121.                 How do you create a histogram using Matplotlib?

122.                 Provide an example of plotting a histogram with specified bin sizes and colors.

123.                 What are scatter plots?

124.                 How do you create a scatter plot using Matplotlib?

125.                 Provide an example of plotting a scatter plot with labeled axes and a title.

126.                 What is Scikit-learn?

127.                 What is the purpose of Scikit-learn?

128.                 Name some key machine learning algorithms implemented in Scikit-learn.

129.                 What is SciPy?

130.                 How does SciPy differ from NumPy?

131.                 Name some key features of SciPy.

132.                 What is NetworkX?

133.                 What is the primary use case of NetworkX?

134.                 Name some key features of NetworkX.

 

135.                 What are errors and exceptions in Python?

136.                 How do you handle exceptions in Python?

137.                 Provide an example of using try-except blocks for exception handling.

138.                 How do you open a file in Python?

139.                 How do you read from a file in Python?

140.                 How do you write to a file in Python?

141.                 Name some fields or industries where Python is commonly used.

142.                 Provide examples of specific applications or projects where Python is used extensively.

143.                 How does Python contribute to the advancement of technology and innovation in various domains?

===================================================   

Post a Comment

0 Comments