Python & Data Analytics (DA) Internship Test

1.Please share your details(Required.)
2.How to access Python integration in Power BI?
A. elect "File" Settings tab → Go to "Options and Settings" Choose "Options"
B. Select "Settings" tab → Go to "Data Load" Choose "Options" -- Select "Python"
C. Select "Modeling" tab → Go to "Options and settings" - Choose "Power Query"
D. Select "Home" tab - Choose "Options" → Select "Usage Data" -- Select "Python"
(Required.)
3.Which of the following is an immutable data type in Python?
A. List
B. Dictionary
C. Tuple
D. Set
(Required.)
4.What will list(range(5,0,-1)) return?
A. [0, 1, 2, 3, 4, 5]
B. [5, 4, 3, 2, 1]
C. [5, 4, 3, 2, 1, 0]
D. [5, 3, 1]
(Required.)
5.How do you correctly handle exceptions in Python?
A. try: ... except:
B. catch: ... except:
C. error: ... except:
D. try: ... catch
(Required.)
6.What is the correct way to open a file named data.txt for reading?
A. file = open("data.txt", "w")
B. file = open("data.txt", "r")
C. file = open("data.txt")
D. Both b and c
(Required.)
7.What does self refer to in Python OOP?
A. A reference to the parent class
B. A reference to the current instance
C. A global variable
D. A static method
(Required.)
8.What does super() do in Python?
A. Calls the parent class constructor
B. Calls the child class constructor
C. Refers to the global variable
D. None of the above
(Required.)
9.What will json.loads('{"name": "Alice"}') return?
A. A dictionary {'name': 'Alice'}
B. A JSON object
C. A string
D. A list
(Required.)
10.What is the output of bool([]) in Python?
A. True
B. False
C. None
D. Error
(Required.)
11.While evaluating regression model, which metric is most appropriate?
A. Accuracy
B. Precision
C. Mean Squared Error
D. Recall
(Required.)
12.What is the correct way to create a NumPy array?
A. np.array([1,2,3])
B. np.array(1,2,3)
C. np.array{1,2,3}
D. np.list([1,2,3])
(Required.)
13.Which method is used to find missing values in a Pandas DataFrame?
A. df.isnull()
B. df.null()
C. df.missing()
D. df.isnan()
(Required.)
14.What function combines two DataFrames in Pandas based on a common column?
A. pd.merge()
B. pd.concat()
C. pd.join()
D. pd.append()
(Required.)
15.What kind of plot is best for visualizing the distribution of a numerical dataset?
A. Scatter plot
B. Bar chart
C. Histogram
D. Line chart
(Required.)
16.What is the purpose of feature scaling in EDA?
A. Remove duplicates
B. Convert categorical to numerical data
C. Normalize numerical values
D. Merge datasets
(Required.)
17.Which measure of central tendency is most affected by outliers?
A. Mean
B. Median
C. Mode
D. None of the above
(Required.)
18.What does df.groupby('Category').sum() do?
A. Groups data by 'Category' and sums numerical columns
B. Creates a cumulative sum
C. Normalizes data by category
D. Deletes duplicate categories
(Required.)
19.In hypothesis testing, what does a p-value < 0.05 indicate?
A. Strong evidence against the null hypothesis
B. Weak evidence against the null hypothesis
C. Null hypothesis is true
D. No statistical significance
(Required.)
20.Which of the following is NOT a valid DataFrame method?
A. df.pivot_table()
B. df.transform()
C. df.transpose()
D. df.split()
(Required.)
21.What function is used to display the first few rows of a Pandas DataFrame?
A. df.head()
B. df.first()
C. df.top()
D. df.preview()
(Required.)
22.What type of relationships are regarded as weak in Power BI?

A.Only one-to-one relationships
B.Only many-to-many relationships belonging to the same island
C.Only many-to-many relationships belonging to different islands
D.Many-to-many relationships belonging to either same or different islands
(Required.)
23.Which data files can be imported to Power BI?
A. Extension = .xlsm
B. Extension = .xlts
C. Extension = .xlsx
(Required.)
24.."Unpivot Columns" is present under which tab of Power BI?

A. Tools
B. Home
C. Add Column
D. Transform
(Required.)
25.Combine two tables Example1 and Example2 into one table Final Example?
A. FinalExample = UNION('Example1', 'Example2')
B. FinalExample = UNION('Example1' && 'Example2')
C. FinalExample = COMBINE('Example1' & Example2')
D. FinalExample = COMBINE('Example1', 'Example2')
(Required.)
26.How to set custom tooltip size on main report page?
A. By accessing the Size tab under Visualization
B. By accessing the Modeling tab under Page View
C. By accessing the Size tab under the Format tab
D. By accessing the View tab under Page View
(Required.)
27.Suitable chart type to visualize multiple data points for trend?
A. Area Chart
B. Stacked Area Chart
C. Line Chart
D. Doughnut Chart
(Required.)
28.To implement row-level security in Power BI, which menu option to use?
A. Insert
B. View
C. Modeling
D. Visual
(Required.)
29.Role assigned to new user with permissions to view dashboards, share items, and more?
Options:

A. Manager
B. Member
C. Viewer
D. Contributor
(Required.)
30..How to check Python version installed?
A. --check version
B. --ver check
C. pip --version
D. p --version
(Required.)
31.Which statement best defines the role of data science in modern organizations?
A. Designing applications
B. Extracting insights from data
C. Managing servers
D. Writing documentation
(Required.)
32.Which Python library is most suitable for handling structured tabular datasets efficiently?
A. NumPy
B. Pandas
C. Matplotlib
D. Seaborn
(Required.)
33.In a dataset with extreme values, which measure of central tendency is least affected by outliers?
A. Seaborn
B. Median
C. Mode
D. Range
(Required.)
34.What is the primary purpose of exploratory data analysis (EDA)?
A. Model deployment
B. Understanding data patterns
C. Writing algorithms
D. Data storage
(Required.)
35.In supervised learning, what is the role of the target variable?
A. Metadata storage
B. Output to be predicted
C. Data cleaning
D. Noise removal
(Required.)
36.Which algorithm is most appropriate for predicting continuous numerical values?
A. K-Means
B. Logistic Regression
C. Linear Regression
D. Naive Bayes
(Required.)
37.What does overfitting indicate about a machine learning model?
A. Good generalization
B. Memorizes training data
C. Under learning
D. Low variance
(Required.)
38.Which technique helps reduce overfitting?
A. Increasing complexity
B. Cross-validation
C. Reducing data
D. Ignoring validation
(Required.)
39.Which metric is more reliable for imbalanced classification problems?
A. Accuracy
B. Precision/Recall
C. Mean
D. Variance
(Required.)
40.What does a confusion matrix represent?
A. Data summary
B. Actual vs predicted outcomes
C. Feature importance
D. Model code
(Required.)
41.Which algorithm is considered a non-parametric, instance-based learning method?
A. Linear Regression
B. K-Nearest Neighbors
C. Logistic Regression
D. Naive Bayes
(Required.)
42.What is the primary goal of feature engineering?
A. Reduce outputs
B. Improve input variables
C. Remove models
D. Store data
(Required.)
43.x = [1, 2, 3]
y = x
y.append(4)
print(x)

A. [1, 2, 3]
B. [1, 2, 3, 4]
C. Error
D. None
(Required.)
44.import numpy as np
a = np.array([1, 2, 3])
print(a * 2)

A. [1,2,3,1,2,3]
B. [2,4,6]
C. Error
D. [1,4,9]
(Required.)
45.
def func(val, lst=[]):
lst.append(val)
return lst

print(func(1))
print(func(2))

A. [1] [2]
B. [1] [1,2]
C. Error
D. [2] [2]
(Required.)
46.import pandas as pd
df = pd.DataFrame({'A':[1,2,3]})
print(df.shape)

A. (3,)
B. (1,3)
C. (3,1)
D. Error
(Required.)
47.import pandas as pd
df = pd.DataFrame({
'A':[1,2,3],
'B':[4,5,6]
})
print(df.head(2))
What does it return?
A. Last 2 rows
B. First 2 rows
C. All rows
D. Error
(Required.)
48.for i in range(1, 5):
if i == 3:
break
print(i, end=" ")
A. 1 2 3 4
B. 1 2
C. 1 2 3
D. Error
(Required.)
49.x = [i*i for i in range(3)]
print(x)
A. [1,4,9]
B. [0,1,4]
C. [0,1,2]
D. Error
(Required.)
50.d = {'a':1, 'b':2}
print(d.get('c', 0))
A. Error
B. None
C. 0
D. KeyError
(Required.)