1/73
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
COUNT counts ____ cells whereas COUNTA counts _____ cells.
a
non-blank , numeric
b
numeric , non-blank
c
numeric, alphanumeric
d
alphanumeric, numeric
numeric , non-blank
Which of the following would count cells in Column D but only when their values were larger than 5.
a
COUNTIF(D1:D10, '> 5')
b
COUNTIF(D1:D10, > 5)
c
COUNTIF(D1:D10, ">5")
d
COUNTIF("D1:D10", ">5")
COUNTIF(D1:D10, ">5")
The proper term for "10,15" in SUM(10, 15) is ____.
argument
Dragging a formula from the bottom edge (not the corner) will probably cause the formula to be ___
moved
Assume a formula in a cell B2 has the cell reference A$2. The formula is copied over to the cell C2 (one cell to the right). The formula in C2 will be ____.
a
A$2
b
B$2
c
B$3
d
C$2
B$2
Assume a formula in a cell B2 has the cell reference A$2.The formula is copied over to the cell B3 (one cell down).The formula in B3 will be ____.
a
A$2
b
A$3
c
B$2
d
B$3
A$2
If a formula containing the reference $B3 is copied over, what part of the formula will change
a
B will change
b
3 will change
c
B and 3 will change
d
Nothing changes
3 will change
A function in Excel can have multiple return values
False
To stop Random values from changing every time or to freeze random values, ______.
a
Copy the cell and Paste Values
b
Copy the cell and Paste Formula
c
Copy the cell and Paste Formatting
d
Lock Cells
Copy the cell and Paste Values
If you were looking up quiz scores by ID numbers using a VLOOKUP function, the id would need to be specified as the ____ argument.
a
first
b
second
c
third
d
fourth
first
In a VLOOKUP, the table_array should _____.
a
include the header row
b
have the first column be the first column of the worksheet
c
have the first column be the first column contain the lookup value
d
exclude data value columns not being used
have the first column be the first column containing the lookup value
Assume a formula in a cell B2 has the cell reference $F2. The formula is copied over to the cell C2 (one cell to the right). The formula in C2 will be ____.
a
$G2
b
$F3
c
$G3
d
$F2
$F2
Assume a formula in a cell B2 has the cell reference A2.The formula is copied over to the cell C3.The formula in B3 will be ____.
a
C3
b
B4
c
B3
d
C4
B3
The type for the value of "99.32" is
a
integer
b
float
c
real
d
string
string
What is the output?
number1 = 5
number1 = 10
#number1 = 2
print (1 + number1)
a. 6 b. 11 c. 3 d. 15
11
What is the output?
number1 = 6
number2 = 11
print (Number1 + number2)
a
6
b
11
c
17
d
Something else / error
Something else / error
Which of the following would generate an error?
a
numbers = [1, 2, 3]
numbers.append(4)
b
numbers = (1, 2, 3)
numbers.append(4)
c
numbers = [1, 2, 3]
numbers.remove(3)
d
numbers = (1, 2, 3)
numbers.remove[3]
numbers = (1, 2, 3)
numbers.append(4)
numbers = (1, 2, 3)
numbers.remove[3]
In Python to extract leading/trailing spaces, use ___.
a
trim
b
strip
c
partition
d
split
strip
title = "Netflix and Chill"
print ( title[0:3] )
a
Net
b
Netf
c
etfl
d
etf
Net
What does the following code result in?
name = Peter
print ( name[2:] )
a
eter
b
ter
c
e
d
t
ter
number = 5
if number > 5 :print ("a")
else:print("b")
What is the output of the code above?
a
a
b
b
c
No output
d
Something else / error
Something else / error
Range (4) will give the range of numbers:
a
4
b
0, 1, 2, 3, 4
c
1, 2, 3, 4
d
0, 1, 2, 3
0, 1, 2, 3
Range (0, 5, 2) will give the range of numbers ___.
a
0, 2, 4
b
1, 3, 4
c
0, 1, 2, 3, 4
d
1, 3, 5
0, 2, 4
To get numbers
4, 2, 0
use:
a
range (4, 2, 0)
b
range (5, 2, -1)
c
range (4, -1, -2)
d
range (4, 0, -2)
range (4, -1, -2)
How do we add one element to a set?
a
append
b
add
c
update
d
insert
add
Which of the following can have duplicate elements?
a
lists
b
sets
c
tuples
lists & tuples
To join two sets, you can use
a
update
b
intersection
c
union
d
plus operator
update, intersection, union
Which of the following would correctly convert a list to a set?
a
numbers = set ( [1, 2, 3] )
b
numbers = list( [1, 2, 3] )
c
numbers = set ( (1, 2, 3) )
d
numbers = list( (1, 2, 3) )
numbers = set ( [1, 2, 3] )
Which of the following properly sets up a dictionary?
a
name = dictionary (name, id)
b
name = { name="Adam", id=2300 }
c
name = ( 'name': 'Adam', 'id': 2300 )
d
name = { 'name': 'Adam', 'id': '2300' }
name = { 'name': 'Adam', 'id': '2300' }
Which of the following is the ideal candidate for using dictionaries?
a
A series of scores for an uncertain number of students
b
Data about one student
c
Data about a number of students
d
Series of logically related values that can be described with a name or a label
b
Data about one student
d
Series of logically related values that can be described with a name or a label
Using the following code, how will you print only the name?data = { 'name': 'Adam', 'id': '2300' }
a
print ( data.name)
b
print ( data[name])
c
print ( data['name'])
d
print ( data!name)
print ( data['name'])
person = {"name": "Fred", "id": "23423" }
for each_item in person:
print( person[each_item] )
What values would get printed out?
a
name Fred
b
name id
c
Fred 23423
d
id 23423
Fred 23423
If you want to be able to have items in a data structure ordered by index numbers and be able to remove some elements later on as well, you would choose ____.
a
tuples
b
lists
c
dictionaries
d
sets
lists
You are importing customer data from 4 sources. If you want a non-repetitive listing of only those states that your customers are in, you should import or copy customer data into ____.
a
tuples
b
lists
c
dictionaries
d
sets
sets
Assume, you have the following data about one Amazon product: Amazon ID Number, Product Name, Product Rating, Number of Reviews
What data structure is this data best suited to?
a
tuple
b
list
c
set
d
dictionary
dictionary
Which of the following keywords creates a new function?
a
create
b
function
c
define
d
def
e
method
def
The purpose of keyword arguments is _____.
a
to allow specification of arguments out of order by using argument names
b
to allow specification of arguments in order but using argument names
c
to allow specification of arguments out of order without using argument names
to allow specification of arguments out of order by using argument names
When a function returns a value, it ______.
a
prints on the output screen
b
prints within the function
c
is given back to the caller function invisibly
d
is visibly seen on the output screen
is given back to the caller function invisibly
Which of the following are true about return values?
a
A function can return only one value
b
A function can return multiple values
c
A function can return only one value, which can in turn contain multiple values
a
A function can return only one value
c
A function can return only one value, which can in turn contain multiple values
To specify unlimited number of parameters in a function, use _____
a
( *lots_of_parameters )
b
( [ ]lots_of_parameters )
c
( lots_of_parameters[ ] )
d
( lots_of_parameters* )
( *lots_of_parameters )
def function_name ( *lots_of_values ):
lots_of_values is a _____.
a
list
b
tuple
c
parameter
d
argument
tuple & parameter
def power(base, exponent):
base = 2
exponent = 3
return base * exponent result = exponent * base
return result
answer = power (3, 2)
print(answer)
a
6
b
8
c
9
d
Some sort of an error
8
A Pandas series is most similar to ____
a. a row of data
b. a column of data
c. a table of data
a column of data
print( data['100'])
The line of code above will print:
a
Data at row 100
b
Data at column 100
c
Data with index 100
d
string literal '100'
data with index 100
A Pandas DataFrame is most similar to ____
a. a row of data
b. a column of data
c. a table of data
a table of data
How would we look up how many null values there are in the dataframe?
a
tail()
b
head()
c
nulls()
d
info()
info()
A Series in Pandas likely contains ____.
a. single row and multiple columns
b. single column and multiple rows
c. single column and single row
d. multiple rows and multiple columns
single column and multiple rows
To look at column headers for a DataFrame, you can use ___
a
info()
b
head()
c
tail()
d
headers()
a
info()
b
head()
c
tail()
A query function selects ____ from a data frame.
a
a subset of rows
b
a subset of columns
c
a subset of rows and a subset of columns
a subset of rows
A query is run on a DataFrame df. The result of the query are stored in a variable, df2.
df2 will ____.
a
have the same number of rows and columns as df.
b
have the same rows but fewer columns as df.
c
have the fewer rows but same columns as df.
d
have same or fewer rows AND same columns as df.
have same or fewer rows and same columns as df
If you want to make changes to the original dataframe, use ___.
a
original()
b
original = True
c
inplace = True
d
original = False
inplace = True
Column names with spaces should be enclosed in ____ within Pandas queries.
a
back quotes ``
b
single quotes ' '
c
double quotes " "
d
Brackets [ ]
back quotes ``
Query function modifies the data frame and converts it to contain a subset of the data
False
A DataFrame ALWAYS has rows and columns
a. True - it's two dimensional
b. False - if there is only one cell, then that's just one cell!
True - it's two dimensional
How would we delete all the rows with invalid cell data?
a
deletena
b
dropna
c
deletenull
d
dropnull
dropna
How would we drop a row that has a value "adf2234" at index row 26?
a
df.dropna(26)
b
df.dropindex(26)
c
df.drop(index=26)
d
df.drop(index=27)
df.drop(index=26)
For a student dataframe that contains student info, the names column has student names.
student_df['name'].str.contains("jr.")
What will this code return or result in?
a
One column of names containing only those rows with "jr." in the name.
b
A data frame of rows and columns, containing only those rows with "jr." in the name
c
One series of boolean values indicating which rows have "jr." in the name
d
A data frame of row and columns, contain boolean values indicating which rows have "jr." in the name
One series of boolean values indicating which rows have "jr." in the name
How do you EDIT cell at row 26 and column 'ABC'?
a
df [26, 'ABC'] = value
b
df [ 'ABC', 26] = value
c
df.loc [ 'ABC', 26] = value
d
df.loc [26, 'ABC'] = value
df.loc [26, 'ABC'] = value
is_empty = True
The data type of 'is_empty' variable is ____.
a
string
b
boolean
c
int
d
N/A - it doesn't have a type
N/A - it doesn't have a type
A(n) _____ name is not followed by parentheses in Python.
a
function
b
property
c
variable
d
attribute
property, variable, attribute
Which of the following is FALSE?
a
A function can have two return values
b
A function can be recognized using parentheses
c
A function can return a list of values
d
A function can have two parameters
a function can have two return values
Arguments MUST be provided in the order listed in a method definition
a
True - they must match each parameter in the proper sequence without exception
b
False
c
Mostly True.... but you can use kwargs to provide arguments in any order.
Mostly True.... but you can use kwargs to provide arguments in any order.
For a tab-delimitted file, how would you specify that the values are delimited using a tab character?
a
separator = 'tab'
b
tab = '\t'
c
separator = '\t'
d
sep = '\t'
sep = '\t'
To find unique records, use ___
a
df[column].unique
b
df[column].unique()
c
df.unique(column)
df[column].unique()
Write one line of code for a data frame, df that changes the value for the Name column at row 5 to 'Mike'.
df.loc[5,'Name']='Mike'
df[column].isna() will return you ____.
a
DataFrame
b
Series of 0 or 1
c
Series of Booleans
d
DataFrame of Index numbers and Booleans
series of booleans
To see data from rows 10 to 15 in data frame, df, you would use: _____.
a
df.loc(10, 15)
b
df[10: 15]
c
df[10, 15]
d
df.location[10, 15]
df[10: 15]
df.loc[5, 'Name'] = 'Mike'
df['Name'].replace('Mike', 'Sam')
print ( df.loc[5, 'Name'] )
What is the output?
a
Mike
b
Sam
c
NaN
d
No output
Mike
Back quotes are REQUIRED for column names within a query
False
How can you get index numbers for all the rows of a data frame?
a
df.index()
b
df['index']
c
df.index
d
df[index]
df.index
You can supply multiple column names (col1, col2) to the drop function using
a
.drop( columns = "col1, col2")
b
.drop( columns = "[col1, col2]")
c
.drop( columns = [col1, col2])
d
.drop( columns = ['col1', 'col2'] )
drop( columns = ['col1', 'col2'] )
Measures are typically ____.
a
discrete
b
continuous
continuous
A product category with values such as "Office", "Home", "Kitchen" would be a ____ in Tableau.
a
measure
b
dimension
dimension
Price would be classified as a ___ in Tableau.
a
measure
b
dimension
measure