Module 2
Module 2
Help
Python Basics for Data Science
Course / Module 2 - Python Data Structur… / Graded Quiz: Python Data Structur…
You are taking "Final Exam" as a timed exam. Show more 00:47:33
Previous Next
11
(11,12)
[21,22]
((11,12),[21,22])
Answer
Incorrect: Review the Lists and Tuples video.
Question 2
1.0/1.0 point (graded)
Consider the tuple A=((1),[2,3],[4]), that contains a tuple and list. What is the result of the following operation A[2]?
[2,3]
[4]
Answer
Correct: The third element in the tuple, which has another list within, corresponds to index 2.
Answer
Incorrect: Review the Lists and Tuples video.
Question 4
1.0/1.0 point (graded)
Consider the following list: A=["hard rock",10,1.2]
What will list A contain after the following command is run? del(A[1])?
Syntax error
["hard rock",1.2]
["hard rock",10]
[10,1.2]
Answer
Correct: The element in index 1 will be deleted.
Question 5
1.0/1.0 point (graded)
If A is a list, what does the following syntax do? B=A[:]
Creates a new reference variable B that points to a copy or clone of the original list A
Answer
Correct: Creates a new reference variable B that points to a copy or clone of the original list A.
Answer
Correct: The function “len” returns the number of elements in a list.
Question 7
1.0/1.0 point (graded)
Consider the following dictionary:
"1977"
"1992"
"The Bodyguard"
Answer
Correct:
This is one of the values.
This is one of the values.
Question 8
1.0/1.0 point (graded)
The variable release_year_dict is a Python Dictionary. What is the outcome of applying the following method? release_year_dict.values()
Answer
Correct: This method returns the values.
Submit
Submit You have used 2 of 2 attempts
Question 9
1.0/1.0 point (graded)
Consider the Set: V={'A','B'}, what is the result of V.add('C')?
{‘AC’, ‘BC’}
{'A','B','C'}
Error
{'A','B'}
Answer
Correct: The method will add a new value to the current set.
Question 10
1.0/1.0 point (graded)
What is the outcome of the following? '1' in {'1','2'} ?
False
True
Answer
Correct: The conditional statement is true
Previous Next
Legal
Terms of Service & Honor Code
Privacy Policy
Accessibility Policy
Trademark Policy
Sitemap
Cookie Policy
Your Privacy Choices
Connect
Idea Hub
Contact Us
Help Center
Security
Media Kit