Programming Essentials Quizzes

¡Supera tus tareas y exámenes ahora con Quizwiz!

Assume a formula in a cell C2 has the cell reference $A2.The formula is copied over to the cell D3.The formula in D3 will be ____.

$A3

For the cell value "=Sum(8, 2)", match the individual parts of the value to the proper names Function Name

Sum

Which of the following functions, attributes, or arguments would allow you to convert a row value of '23asdf' to NaN?

errors kwarg

name = "Smurfette" print (name[4:6]) What would be the output of the above set of statements?

fe

DataFrame column information can be obtained using ___.

info()

A filter in Tableau applies to ____ chart/visualization.

one

state = "Pennsylvania" Which of the following will return the substring "Penn" in Python?

state[0:4]

If Katya writes "Product(B2, 5)" into cell C2, she would see ____.

"Product(B2, 5)" displayed in cell C2

greeting = "hello" print( greeting[2:]) What is the output of the code above?

"llo"

Assume a formula in a cell B2 has the cell reference $C2.The formula is copied over to the cell B3.The formula in D3 will be ____.

$C3

numbers = ​[43, 24, 375]for i in range ( ): print( numbers ​[i] )Which of the following choices used as arguments for the range function, would ensure that the entire list is looped through? Correct answer:

0, 3, 1

number_list = [5, 10, 15, 20] print(number_list[0] + 5) What would be the output of the statements above? Write your answer as a numeral, e.g., 0 or 1 rather than spelling out the word.

10

What numbers would be generated by range(11, 5, -2)?

11, 9, 7

A boolean value can have up to ____ different values.

2

For the cell value "=Sum(8, 2)", match the individual parts of the value to the proper names argument 2

2

for i in range (31, 34): print (i, end = " ") What will be the output of the code above?

31 32 33

for i in range(5, 18, 3): print( i, end = " ") Instructions: Enter all numbers on ONE line. Each number should be separated by ONE space, Do not use quotes, brackets, etc. e.g, 1 2 3 4 The output of the code above is:

5 8 11 14 17

What numbers would be generated by range(5, 11, 2)?

5, 7, 9

for i in range (51, 53): print (i) What will be the output of the code above?

51 52

How many cells are included in B3:B8? Enter a numeral, e.g., 1 or 2

6

How many numbers would be generated by the following range? range (0, 6, 1)

6

How many numbers would be generated by the following range? range (0, 7, 1)

7

Consider the following code: list1 = [43, 78, 43, 34] list2 = [34, 78, 89]set1 = set(list1) set2 = set(list2) set3 = {78, 908}joined_set = set1.union(set2) intersected_set = joined_set.intersection(set3)for each_number in intersected_set: print(each_number) # print is indented properly Instructions: Enter all numbers on ONE line. Each number should be separated by a space, Do not use quotes, brackets, etc. e.g, 1 2 3 4 The output of the code above is:

78

For the cell value "=Sum(8, 2)", match the individual parts of the value to the proper names argument 1

8

number_list = [5, 10, 15, 20] print(number_list[0] + 4) What would be the output of the statements above? Write your answer as a numeral, e.g., 0 or 1 rather than spelling out the word.

9

number_list = [5, 10, 15, 20] print(number_list[1]-1) What would be the output of the statements above?

9

For the cell value "=Sum(8, 2)", match the individual parts of the value to the proper names Return Value

=Sum(8, 2)

Which of the following is the correct way to write a formula to add up cells C1 through C3?

=Sum(C1:C3)

When copying formulas, _______ will not change when the formula is copied to another cell.

Absolute References

Considering the cell value "=Sum(C2:D3)", the range in the formula is ____.

C2:D3

If you want to find out the number of times the value "In Stock" occurs in a column, use ____.

COUNTIF

AverageIf

Calculates mean of cells that meet a specific condition

CountIf

Counts cells that meet a specific condition

Count

Counts the number of all cells

CountA

Counts the number of non-blank cells

Match the parts of the formula to what it does:= VLOOKUP ("IL", B3:N10, 6, FALSE); False

Do an exact or approximate match

Match the correct answer to the Python concept. Variables

Do not have a data type

A space literal, i.e., " ", is the same as a null value.

False

A tuple can have elements added to it. False True

False

Variables have data types in Python False True

False

Match the correct answer to the Python concept. Values

Have a data type

Match the parts of the formula to what it does:= VLOOKUP ("IL", B3:N10, 6, FALSE); B3:N10

In this region of cells

For the code below, what would be printed out? person = { "name": "John", "city": "Chicago", } for each_item in person: print(person[each_item])

John Chicago

Match the parts of the formula to what it does:= VLOOKUP ("IL", B3:N10, 6, FALSE); IL

Look for this value

for i in range (50, 10, 10): print (i, end = " ") What would the output of the code above be?

No output

Match the parts of the formula to what it does:= VLOOKUP ("IL", B3:N10, 6, FALSE); 6

Retreive the corresponding value from this column

Which of the following can be considered one column of data in Python?

Series

To join two lists together, use ____.

The plus operator

A list can have elements added to it. True or False

True

To link multiple tables together, you typically try to create a relationship between _____. Two rows with identical indexes Two rows with identical values Two columns with identical column names Two columns with the same logical meaning, which would have the same values for some rows

Two columns with the same logical meaning, which would have the same values for some rows

Two sets are being joined, Set 1 and Set 2. What method would join these sets such that it includes all elements of Set 1 and Set 2 but remove all the duplicates?

Union

If you click Paste, which of these Paste options would you select to paste only the number from a cell.

Values

cafe_list = ["a", "b"] cafe_list.append("c") cafe_list.append("c") cafe_list.append("a") cafe_list.remove("a") for each_cafe in cafe_list: print(each_cafe, end=" ") Instructions: Enter all letters on ONE line. Each letter should be separated by ONE space, Do not use quotes, brackets, etc. e.g, a b c d The output of the code above is:

b c c a

If you want to visually emphasize data cells that meet a certain rule, use ___.

conditional formatting

If you want to see 5 variants of a chart, based on 5 different values of a variable, you should ____. create 5 filters on 1 chart create 1 chart and use Details on the Marks card create 1 chart and use Pages create 5 charts

create 1 chart and use Pages

Which of the following can allow you to edit a specific at row 20 for column 'name'?

df.loc [20, 'name'] = "John"

Which of the following drops row with index 250 correctly?

df2 = df.drop(index=250)

Which is the correct way to calculate the mean of a column "Quiz1"? df( 'Quiz1' ).mean() df[ {Quiz1} ].mean() df[ 'Quiz1' ].mean() mean( df[ 'Quiz1' ])

df[ 'Quiz1' ].mean()

A year will typically be considered (a/an) _____ in Tableau.

dimension

You can test multiple conditions in Python conditional statements using ____ keyword

else

name = "Smurfette" print (name[4:]) What would be the output of the above set of statements?

fette

Peter wants to check if the string "PA" is present in an address, located in cell B5. He should use the ___ function.

find

Which of the following is a correct formulation of an if statement that tests if x is greater than 10.

if x > 10: print("x is greater than 10")

Which of the following would cause an original DataFrame to be modified? original = True inplace = False inplace = True original = False

inplace = True

Two sets are being joined, Set 1 and Set 2. What method would join these sets such that it includes only elements present in both Set 1 and Set 2?

intersection

A dollar value will typically be considered a ____ in Tableau.

measure

set1 = {32, 56, 78} set2 = {32, 56, 79, 32} The conjunction of set1 and set2 will have ____ elements.

n/a - there is no such function

For the code below, what would be printed out? person = { "name": "John", "city": "Chicago", } for each_item in person: print(each_item)

name city

For the code below, how you would set the the city to "Pittsburgh"? person = { "name": "John", "city": "Chicago", }

name['city'] = "Pittsburgh"

Which of the following creates a tuple? numbers = [1, 2, 3] numbers = "1, 2, 3" numbers = (1, 2, 3) numbers = {1, 2, 3}

numbers = (1, 2, 3)

Which of the following creates a list? numbers = {1, 2, 3} numbers = (1, 2, 3) numbers = "1, 2, 3" numbers = [1, 2, 3]

numbers = [1, 2, 3]

Which of the following creates a set? numbers = [1, 2, 3] numbers = (1, 2, 3) numbers = "1, 2, 3" numbers = {1, 2, 3}

numbers = {1, 2, 3}

person = { "name": "John", "city": "Chicago", } To get a list containing "name" and "city", use ___.

person.keys()

person = { "name": "John", "city": "Chicago", } To get a list containing "John" and "Chicago", use ___.

person.values()

For the code below, how you would set the the city to "Pittsburgh"? person = { "name": "John", "city": "Chicago", }

person['city'] = "Pittsburgh"

phrase = "AZ AR AK CO IL WA PA" The ___ function call returns a total of 7 elements.

phrase.split(" ")

Which of the following can be used to generate a new number? random() rand() NewNumber() new()

rand()

To open a CSV file from an internet-based URL in Pandas, use ___.

read_csv(url)

% is the ____ operator.

remainder

state = "Colorado" Which of the following will return the substring "Co" Correct answer:

state[:2]

state = "Massachussetts" Which of the following will return the substring "Mas"

state[:3]

A practical difference between strings and integers is that ___.

string are always alphabets whereas integers are always numerals.

You can get a list of unique values in a column using ___.

unique()


Conjuntos de estudio relacionados

ECON 1000 Final Steffans & Whitworth Fall 2019

View Set

Closing the Real Estate Transaction

View Set

Vertical and Horizontal TransitionsWhich of the following statements best describes a trigonometric function having undergone a phase shift? Select all that apply.

View Set

endocrine exam 1 pineal gland and melatonin

View Set

3.1 Basic Machine Startup-Basic Lathe Operator

View Set

Study**Chapter 9: Drug Therapy for Coagulation Disorders

View Set

Intro to New Testament Ch. 6,7,8,11

View Set