Python for Data Science
- 52Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
52 questions
- 1A step-by-step solution for a problem that works for every instance is called an_____.
Hint
Think about the term used for a general procedure that can be applied repeatedly.
Answer
algorithm
- 2A structured way to express an algorithm using keywords and indentation, without relying on a specific programming language, is called_____.
Hint
It is a halfway between plain English and actual code.
Answer
pseudocode
- 3In a flowchart, the start and end of a procedure are represented using_____shapes.
Hint
These are the shapes that look like ellipses or rounded rectangles.
Answer
oval
- 4The process of repeatedly executing a set of steps until a condition is met is called a_____.
Hint
It allows repetition in algorithms.
Answer
loop
- 5In the context of problem solving, a_____is a more precise and unambiguous way to express an algorithm compared to natural language.
Hint
It uses keywords and structured statements.
Answer
pseudocode
- 6When writing pseudocode, the convention is that list indexing starts from_____.
Hint
In the course, they used this convention for pseudocode, different from Python.
Answer
1
- 7In Python, a variable's type is determined automatically based on the value assigned; this feature is called_____typing.
Hint
You don't need to declare the type beforehand.
Answer
dynamic
- 8The assignment operator in Python is the_____symbol.
Hint
It is used to store a value in a variable.
Answer
=
- 9The data type of the value_____
3.14is.Hint
It contains a decimal point.
Answer
float
- 10A complex number in Python is written as_____
2 + 3j. The imaginary part is denoted by the letter.Hint
It is used instead of 'i' common in mathematics.
Answer
j
- 11The arithmetic operator that returns the integer quotient of a division is_____.
Hint
It performs floor division.
Answer
//
- 12The Boolean data type can have two values:_____and False.
Hint
It is the opposite of false.
Answer
True
- 13The operator that checks if two values are not equal is_____.
Hint
It is composed of an exclamation mark and an equals sign.
Answer
!=
- 14The logical operator that returns True only when both operands are True is_____.
Hint
It behaves like conjunction.
Answer
and
- 15In Python, a variable name cannot start with a_____.
Hint
Think of the rules for identifiers.
Answer
digit
- 16The keyword used to define a function in Python is_____.
Hint
It is short for 'define'.
Answer
def
- 17A_____is a string literal used as the first statement in a function to describe its purpose.
Hint
It is enclosed in triple quotes.
Answer
docstring
- 18The_____statement is used to exit a function and optionally return a value.
Hint
It sends a value back to the caller.
Answer
return
- 19Variables defined inside a function have_____scope and are not accessible outside the function.
Hint
They exist only during function execution.
Answer
local
- 20To accept an arbitrary number of positional arguments in a function, you use_____
*args.Hint
It is a single asterisk before the parameter name.
Answer
- 21When defining a function, a parameter with a_____value is optional at call time.
Hint
It is specified using an equals sign in the function definition.
Answer
default
- 22A Python file containing functions that can be imported into other scripts is called a_____.
Hint
It has a .py extension.
Answer
module
- 23The string method that removes whitespace from the beginning and end of a string is_____.
Hint
It also removes leading and trailing spaces.
Answer
strip
- 24Strings in Python are_____, meaning their elements cannot be changed after creation.
Hint
It is the opposite of mutable.
Answer
immutable
- 25The expression_____
"Hello" + " " + "World"results in the string.Hint
The plus operator concatenates strings.
Answer
"Hello World"
- 26The slicing operation_____
s[2:5]on a string returns characters from index 2 up to, but not including, index.Hint
The end index is exclusive.
Answer
5
- 27To check if a substring is present in a string, you can use the_____keyword.
Hint
It returns a Boolean.
Answer
in
- 28A list is a_____data structure, meaning its elements can be changed after creation.
Hint
It is the opposite of immutable.
Answer
mutable
- 29A tuple is defined using_____parentheses.
Hint
These are round brackets.
Answer
()
- 30A set is an unordered collection that does not allow_____elements.
Hint
Each element appears only once.
Answer
duplicate
- 31In a dictionary, each item consists of a key and a_____.
Hint
It is the second part of the pair.
Answer
value
- 32The list method that adds an element to the end of the list is_____.
Hint
It takes one argument.
Answer
append
- 33To remove and return the last element of a list, you use the_____method.
Hint
It can also accept an index.
Answer
pop
- 34Assigning one list variable to another does not create a copy; instead, it creates a_____to the same list object.
Hint
Both variables point to the same memory location.
Answer
reference
- 35To create a true independent copy of a list, you can use the_____method.
Hint
It is called on the list object.
Answer
copy
- 36In NumPy, the property that returns the number of dimensions of an array is_____.
Hint
It is short for 'number of dimensions'.
Answer
ndim
- 37The NumPy function that creates an array of evenly spaced numbers within a range is_____.
Hint
It returns a specified number of samples.
Answer
linspace
- 38The attribute that returns a tuple of array dimensions is_____.
Hint
It gives the size of each dimension.
Answer
shape
- 39In NumPy, slices of arrays return a_____of the original data, not a copy.
Hint
Changes to the slice affect the original array.
Answer
view
- 40The operation of adding a scalar to an array, where the scalar is automatically 'spread' across the array, is called_____.
Hint
It allows operations on arrays of different shapes.
Answer
broadcasting
- 41A function that operates element-wise on a NumPy array and is implemented in compiled C for speed is called a_____function.
Hint
Often abbreviated as ufunc.
Answer
universal
- 42The NumPy function that returns the indices of elements that satisfy a condition is_____.
Hint
It can be used to find locations of specific values.
Answer
argwhere
- 43In pandas, a one-dimensional labeled array is called a_____.
Hint
It is similar to a column in a spreadsheet.
Answer
Series
- 44A two-dimensional tabular data structure with labeled axes in pandas is called a_____.
Hint
It is similar to a table or Excel sheet.
Answer
DataFrame
- 45To read a CSV file into a DataFrame, you use the pandas function_____.
Hint
It is called on the pandas module.
Answer
read_csv
- 46The pandas method that fills missing values in a DataFrame is_____.
Hint
It stands for 'fill NA'.
Answer
fillna
- 47The pandas method that removes rows with missing values is_____.
Hint
It drops NA entries.
Answer
dropna
- 48The pandas method used to split data into groups based on some criteria is_____.
Hint
It is followed by an aggregation function.
Answer
groupby
- 49The function from matplotlib.pyplot that creates a line plot is_____.
Hint
It is called on the pyplot module.
Answer
plot
- 50To create a scatter plot in matplotlib, you use the function_____.
Hint
It displays individual points without connecting lines.
Answer
scatter
- 51The command to display a plot in matplotlib is_____.
Hint
It is called at the end of plotting commands.
Answer
show
- 52In matplotlib, to add a legend to a plot, you call the_____method.
Hint
It is called on the pyplot object.
Answer
legend

Ask anything
We've read this whole study set, so questions about it get the best answers.