Manali Ma'am QB Python Updated
Manali Ma'am QB Python Updated
Answer: b
Explanation: Python is a high-level programming language known for its readability and simplicity.
a) //
b) #
c) –
d) /* */
Answer: b
Explanation: The hash symbol (#) is used for single-line comments.
x=5
y=2
print(x ** y)
a) 10
b) 7
c) 25
d) 3
Answer: c
Explanation: The ** operator in Python represents exponentiation. Therefore, x ** y equals 5 raised
to the power of 2, which is 25.
a) 2var
b) _myVar
c) my-var
d) my var
Answer: b
Explanation: Variable names in Python can start with a letter or an underscore (_) followed by
letters, digits, or underscores.
a) A list of numbers
b) A tuple of numbers
c) A sequence of numbers
d) A dictionary of numbers
Answer: c
Explanation: The range() function in Python returns a generator object that generates a sequence of
numbers.
a) int
b) float
c) char
d) str
Answer: c
Explanation: In Python, there is no separate data type called “char”. Characters are represented as
strings of length 1.
Answer: a
Explanation: The strip() method in Python removes all leading and trailing whitespace characters
from a string.
Q8. Which of the following statements is true about Python’s variable naming convention?
Answer: c
Explanation: Python’s variable naming convention allows the use of underscores (_) to separate
words in variable names, making them more readable.
print(3 * 'abc')
a) abcabcabcabc
b) abcabc
c) abcabcabc
d) Error: cannot multiply sequence by non-int of type ‘str’
Answer: c
Explanation: The expression 3 * ‘abc’ will concatenate the string ‘abc’ three times, resulting in
‘abcabcabc’.
Q10. Which of the following is used to open a file in Python for reading and writing?
a) r+
b) rw
c) a+
d) Both a and c
Answer: d
Explanation: Both the modes ‘r+’ and ‘a+’ can be used to open a file for reading and writing in
Python.
Answer: b
Explanation: The __init__ method is a constructor method in Python that is automatically called
when a new instance of a class is created. It is used to initialize the object’s state.
Q12. Which of the following is NOT a valid way to comment out multiple lines of code in Python?
Answer: d
Explanation: Using a semicolon (;) at the end of each line is not a valid way to comment out multiple
lines of code in Python. The correct options are a), b), and c).
print(9 / 2)
a) 4.5
b) 4
c) 4.0
d) Error: division by zero
Answer: a
Explanation: In Python 3, division of two integers using the ‘/’ operator results in a float, so the
output will be 4.5.
a) tuple
b) array
c) set
d) dictionary
Answer: b
Explanation: In Python, an array is not a built-in data type. However, arrays can be implemented
using libraries like NumPy.
Answer: b
Explanation: The break statement in Python is used to exit the current loop prematurely.
a) tuple
b) string
c) list
d) set
Answer: c
Explanation: Lists are mutable, meaning their elements can be changed after the list is created.
x = 10
y=5
print(x > y and x < 15)
a) True
b) False
c) Error: invalid syntax
d) Error: x and y are not defined
Answer: a
Explanation: The expression x > y and x < 15 evaluates to True because both conditions are True: x is
greater than y and x is less than 15.
Answer: d
Explanation: Python uses indentation to indicate blocks of code, making it highly readable.
Answer: d
Explanation: The len() function in Python can be used to find the length of strings, lists, tuples,
dictionaries, and other iterable objects.
Q20. Which of the following is the correct way to open a file named “example.txt” in Python for
reading?
Answer: a
Explanation: The correct mode for opening a file for reading in Python is “r”.
Q21. What does the append() method do when used with lists in Python?
Answer: a
Explanation: The append() method adds an element to the end of a list in Python.
Q22. Which of the following is the correct way to define a function in Python?
a) def function_name:
b) function function_name():
c) define function_name():
d) def function_name():
Answer: d
Explanation: In Python, functions are defined using the def keyword followed by the function name
and parentheses.
my_list = [1, 2, 3, 4, 5]
print(my_list[2:4])
a) [1, 2]
b) [3, 4]
c) [2, 3]
d) [2, 4]
Answer: b
Explanation: Slicing in Python returns a sublist containing elements from the specified start index
(inclusive) to the specified end index (exclusive).
Q24. Which of the following is the correct way to import the math module in Python?
a) import math
b) include math
c) use math
d) require math
Answer: a
Explanation: The import keyword is used to import modules.
a) <=
b) =>
c) ==
d) !=
Answer: b
Explanation: The correct comparison operator for “greater than or equal to” is >=.
Q26. What does the pop() method do when used with lists in Python?
Answer: b
Explanation: By default, the pop() method returns and removes the last element of a list.
Answer: b
Explanation: The None keyword in Python represents the absence of a value, similar to null in other
programming languages.
a) 3.3333
b) 3.0
c) 3
d) 4
Answer: a
Explanation: In Python 3, division (/) always returns a float result, even if the dividend and divisor are
both integers.
a) dlroW olleH
b) Hello World
c) World Hello
d) olleH dlroW
print(type(3.5))
a) <class ‘float’>
b) <class ‘int’>
c) <class ‘string’>
d) <class ‘number’>
a) 1_variable
b) variable_name
c) variable-name
d) None
Answer: b) variable_name
Explanation: A valid variable name must start with a letter or an underscore, followed by letters,
digits, or underscores.
'Hello' == 'hello'
a) True
b) False
c) Error
d) None
Answer: b) False
Explanation: String comparison is case-sensitive. Hence, ‘Hello’ and ‘hello’ are not equal.
Q34. Which among these is based on feedback-based Machine Learning?
Q35. In how many ways can you analyze data in Data Science?
i. 2
ii. 3
iii. 4
iv. 7
Answer: 3. 4
Q36. Which data analysis is concerned with steps and actions to be taken in the future to obtain a
specific outcome?
Q37. Which of these functions is not suitable for importing csv files in R?
i. read.csv()
ii. read_excel()
iii. read.table()
Answer: 2. read_excel()
i. class
ii. stats
iii. base
iv. utils
Answer: 3. base
Q39. In Python, what output can you expect with time.time()
Q40. Identify among the options which is not a core data type
i. Class
ii. Dictionary
iii. Lists
iv. Tuples
Answer: 1. Class
Q41. Which type of statistics uses probability and is suitable to generalize a large data set?
i. Descriptive statistics
i. Data wrangling
i. Random Forest
ii. k-Means
Q45. Which method will you use to reduce the impact of outliers on the dataset?
i. Data transformation
i. Naive Bayes
ii. k-Means
Q47. Under which rule does Procedural Domain Knowledge fit when considering a rule-based
system?
i. Condition-Action Rule
v. Both a and b
i. Number of iterations
Q50. What is the critical factor in choosing an appropriate node during tree construction?
Q51. What will be the consequence of the wrong choice of learning rate value in gradient
descent?
i. Slow convergence
iii. Oscillations
Q52. Which is the correct operation to fix violations in the Red-Black Tree after node deletion?
i. Balancing
ii. Trimming
iii. Recoloring
Answer: 3. Recoloring
Q53. Choose the Python data structure responsible for the storage and manipulation of tabular
data in Data Science.
i. Array
ii. List
iii. Dictionary
iv. DataFrame
Answer: 4. DataFrame
i. Interpretation
ii. Predictions
iii. Conclusion
Answer: 2. Predictions
Q56. Which of these is not the Meta Character of Regex in data analytics?
i. *
ii. #
iii. {}
iv. ^
Answer: 2. #
i. 1 and 3
ii. 1 and 4
iii. 2 and 4
iv. 2 and 3
Answer: a. 1 and 3
A. Dealing with huge amounts of data to find marketing patterns is known as data science
C. It is a study that deals with a huge amount of all types of data structured, unstructured, or
semi-structured
Explanation:
Data science is the study that deals with the huge amount of all types of data i.e., structured,
unstructured, and semi-structured, to find out the hidden pattern from the data which can be used
for making good marketing strategies, in customer benefit, in better decision making, etc is what
data science is all about.
A. Structured data is a type of data that is huge in number and has many inaccurate values
B. Structured data is a type of data that is very less in number and can be stored in proper rows
and columns
C. Structured data is a type of data that has inaccurate values but can be stored in rows and
columns
Answer: B) Structured data is a type of data that is very less in number and can be stored in proper
rows and columns.
Explanation:
Structured data is a type of data that is very less in number and can be stored in proper rows and
columns. We can use simple MYSQL to store the structured data.
A. Unstructured data is a type of data that is huge in number and has many inaccurate values
B. Unstructured data is a type of data that is very less in number and can be stored in proper
rows and columns
C. Unstructured data is a type of data that has inaccurate values but can be stored in rows and
columns
Answer: A) Unstructured data is a type of data that is huge in number and has many inaccurate
values.
Explanation:
Unstructured data is a type of data that is huge in number and has many inaccurate values and you
can not process it or store it using the traditional form of storing data.
A. Semi-structured data is a type of data that is huge in number and has many inaccurate values
B. Semi-structured data is a type of data that is very less in number and can be stored in proper
rows and columns
C. Semi-structured data is a type of data that has inaccurate values but can be stored in rows
and columns
D. Semi-structured data is a type of data which has contained the data of both types i.e.,
structured data and semi-structured data
Answer: D) Semi-structured data is a type of data which has contained the data of both types i.e.,
structured data and semi-structured data.
Explanation:
Semi-structured data is a type of data which has contained the data of both types i.e., structured
data and semi-structured data.
Q62. What is the difference between BI (Business intelligence) and Data science?
A. Data science deals with all types of data whereas BI deals with only structured types of data
B. BI deals with all types of data whereas Data science deals with only structured types of data
C. BI deals with only structured and unstructured types of data but not semi-structured
whereas Data science deals with only structured types of data
D. Data science deals with only structured and unstructured types of data but not semi-
structured whereas BI deals with only structured types of data
Answer: A) Data science deals with all types of data whereas BI deals with only structured types of
data.
Explanation:
Data science deals with all types of data whereas BI deals with only structured types of data.
A. YES
B. NO
Answer: B) NO
Explanation:
NO, BI only deals with the past and present forms of data it has no relation to making future
predictions.
A. Statistics
B. Data expertise
C. Data engineering
D. Visualization
E. Advanced computing
Answer: D) Visualization
Explanation:
Statistics, Data expertise, Data engineering, Visualization, and Advanced computing are all
components of data science.
A. ML is a branch of science that deals with data and the processing of data
B. ML is the branch of AI (artificial intelligence) that give machines the power of what a human
can do
C. ML is the branch of AI (artificial intelligence) that only deals with computer programs to
make valuable insight from the data
Answer: B) ML is the branch of AI (artificial intelligence) that give machines the power of what a
human can do.
Explanation:
ML is the branch of AI (artificial intelligence) that give machines the power of what a human can do.
A. There are three types of machine learning semi-supervised, supervised, and unsupervised
B. There are four types of machine learning semi-supervised, supervised, unsupervised, and
reinforcement
Answer: B) There are four types of machine learning semi-supervised, supervised, unsupervised, and
reinforcement.
Explanation:
There are four types of machine learning semi-supervised, supervised, unsupervised, and
reinforcement.
Q67. Which type of machine learning is defined by using only labeled data to predict some
outcome?
Explanation:
Supervised machine learning is defined as using only labeled data to predict some outcome.
Q68. Which type of machine learning is defined by using only unlabelled data to analyze the data?
Explanation:
Unsupervised machine learning is defined as using only unlabelled data to analyze the data.
Q69. Which type of machine learning is defined by a combination of labeled data and unlabeled
data to analyze the data?
Explanation:
Semi-supervised machine learning is defined by a combination of labeled data and unlabelled data to
analyze the data
Explanation:
A. 2
B. 3
C. 4
D. 5
Answer: A) 2
Explanation:
Explanation:
Explanation:
Explanation:
Q75. Processing of raw data to prepare it for some other data is known as ____.
A. Data pre-processing
B. Data mining
C. Data preparation
D. Data transformation
Explanation:
Pre-processing is the processing of raw data to prepare it for some other data.
A. Risk detection
B. Image recognition
C. Speech recognition
Explanation:
Risk detection, Image recognition, and Speech recognition all are the application of data science.
A. A data mesh is a centralized data architecture that organizes the data according to the
industry
B. A data mesh is a decentralized data architecture that organizes the data according to the
industry
C. A data mesh is a decentralized data architecture that organizes the data and processes the
data according to the industry and user needs
Answer: B) A data mesh is a decentralized data architecture that organizes the data according to the
industry.
Explanation:
A data mesh is a decentralized data architecture that organizes the data according to the industry.
B. 4
C. 3
D. 5
Answer: C) 3
Explanation:
There are three types of data mesh are – file-based, event-driven, and query-enabled.
Q79. How many types of data analysis are there in data science?
A. 2
B. 4
C. 3
D. 5
Answer: B) 4
Explanation:
There are four types of data analysis: - Descriptive, diagnostic, Predictive, and Prescriptive.
Q80. Which type of data analysis gives a summary of the raw data set?
Explanation:
Descriptive data analysis gives a summary of the raw data set and answers the questions like "what
happened" by looking the past data.
Q81. Which type of data analysis focuses on the question "Why did it happen" and finds the
correlations of the causes?
Explanation:
Diagnostic data analysis focuses on the question "Why did it happen" and find the correlations of the
causes.
Q82. Which type of data analysis focuses on the question "what might happen in the future" and
helps in making predictions about some sort of data?
Explanation:
Predictive data analysis focuses on the question "what might happen in the future" and helps in
predicting some sort of data.
Q83. Which type of data analysis focuses on the question "what should we do next" and helps in
about the steps we should take to get the particular outcome?
Explanation:
Prescriptive data analysis focuses on the question "What should we do next" and helps in about the
steps we should take to get the particular outcome.
Q84. What do you mean by the model planning phase in the life cycle of data analytics?
A. This phase involves creating data sets for training for testing, production, and training
purposes
C. This Phase involves the team which is responsible for evaluating the tools
Answer: A) This phase involves creating data sets for training for testing, production, and training
purposes.
Explanation:
The model planning phase involves creating data sets for training for testing, production, and training
purposes.
Q85. What are the common tools for the model planning phase?
A. R's
B. SQL
C. Tableau
D. SAS
Explanation:
The common tools for the model planning phase are: - R's, SQL, Tableau, SAS, and Rapid Miner.
Explanation:
A. Danial Smilkov
B. Shan Carter
C. Yann LeCun
D. Ian J. Goodfellow
Explanation:
A. GAN is a machine learning model in which two neural networks compete to provide the most
accurate and best prediction
C. GAN is a machine learning model which is used to only analyze and process the data with the
help of a neural network
Answer: A) GAN is a machine learning model in which two neural networks compete to provide the
most accurate and best prediction.
Explanation:
GAN is a machine learning model in which two neural networks compete to provide the most
accurate and best prediction.
A. Generating images
B. Face aging
C. Image modification
Explanation:
Generating images, Face aging, and Image modification are the applications of GAN.
Answer: a
Explanation: Data science focuses on analyzing and interpreting data to extract insights and
knowledge from it.
Answer: d
Explanation: Data visualization is the presentation of data in a pictorial or graphical format.
Q92.Which of the following characteristic of big data is relatively more concerned to data science?
a) Volume
b) Velocity
c) Variety
d) None of the mentioned
Answer: c
Explanation: Big data enables organizations to store, manage, and manipulate vast amounts of
disparate data at the right speed and at the right time.
Q94.Which of the following step is performed by data scientist after acquiring the data?
a) Data Integration
b) Data Replication
c) Data Cleansing
d) All of the mentioned
Answer: c
Explanation: Data cleansing, data cleaning, or data scrubbing is the process of detecting and
correcting (or removing) corrupt or inaccurate records from a record set, table, or database.
Q95.Which of the following data mining technique is used to uncover patterns in data?
a) Data bagging
b) Data Dredging
c) Data merging
d) Data booting
Answer: b
Explanation: Data dredging, also called data snooping, refers to the practice of misusing data mining
techniques to show misleading scientific ‘research’.
Q96.Which of the following makes use of pandas and returns data in a series or DataFrame?
a) freedapi
b) pandaSDMX
c) OutPy
d) None of the mentioned
Answer: a
Explanation: freedapi module requires a FRED API key that you can obtain for free on the FRED
website.
Answer: a
Explanation: Use acast or dcast depending on whether you want vector/matrix/array output or data
frame output.
Q98.Which of the following gave rise to the need for graphs in data analysis?
a) Decision making
b) Communicating results
c) Data visualization
d) All of the mentioned
Answer: d
Explanation: A picture can tell a better story than data.
Q99.Which of the following testing is concerned with making decisions using data?
a) Hypothesis
b) Probability
c) Causal
d) None of the mentioned
Answer: a
Explanation: The null hypothesis is assumed true, and statistical evidence is required to reject it in
favor of a research or alternative hypothesis.
Answer: a
Explanation: Data dredging is sometimes referred to as “data fishing”.