1/25/26, 9:43 AM Python for Data Science - - Unit 5 - Week 2
([Link] ([Link]
nageswari@[Link]
NPTEL ([Link] » Python for Data Science (course)
Click to register
for Certification
exam
Week 2 : Assignment 2
([Link]
Your last recorded submission was on 2026-01-25, 09:42 IST Due date: 2026-02-04, 23:59 IST.
If already 1) Which of the following object does not support indexing? 1 point
registered, click
to check your tuple
payment status list
dictionary
set
Course
outline 2) How can you concatenate the strings “data” and “science” with a hyphen(-) 2 points
between them?
About NPTEL “data”.join(“science”)
()
“-”.join([“data”, “science”])
How does an “data” + “-” + “science”
NPTEL online None of the above.
course work?
()
3) What will be the output of the following code snippet? 2 points
Week 0 ()
Week 1 ()
Week 2 ()
Jupyter setup
(unit? [[ 5 12]
[21 32]]
[Link] 1/4
1/25/26, 9:43 AM Python for Data Science - - Unit 5 - Week 2
unit=30&lesson [[19 22]
=31)
[43 50]]
Sequence_data [[3 8]
_part_1 (unit? [35 56]]
unit=30&lesson
[[ 5 21]
=32)
[12 32]]
Sequence_data
_part_2 (unit? 4) What will be the output of the following code snippet? 2 points
unit=30&lesson
=33)
Sequence_data
_part_3 (unit?
unit=30&lesson
=34)
Sequence_data [ 1 10 3 4 5 6 7 8 9 10]
_part_4 (unit?
unit=30&lesson [ 10 1 2 3 4 5 6 7 8 9]
=35) [ 0 10 2 3 4 5 6 7 8 9]
Numpy (unit? [ 10 2 3 4 5 6 7 8 9 ]
unit=30&lesson
=36) 5) What is the output of the following code? 2 points
Week 2 :
Lecture slides
(unit?
unit=30&lesson
=37)
Week 2 - FAQs
(unit?
unit=30&lesson
=38)
[2, 3, 4, 5]
Quiz: Week 2 :
[0, 1, 2, 3]
Assignment 2
(assessment? [1, 2, 3, 4]
name=183) Will throw an error: Set objects are not iterable.
Practice: Week
2 : Practice 6) What will be the output of the following code snippet? 1 point
Assignment 2
(assessment?
name=184)
Download
Videos ()
Books () {27.5}
{1, 'four ', 3.0, 3, 5, 'two ', 10, 27.5}
{1, 'four ', 3.0, 5, 'two ', 10, 27.5}
[Link] 2/4
1/25/26, 9:43 AM Python for Data Science - - Unit 5 - Week 2
Text {1, 'four ', 3.0, 5, 'two ', 3}
Transcripts () 7) Let t1 = (1, 2, “tuple”, 4) and t2 = (5, 6, 7). Which of the following will not give any 2 points
error after the execution?
Problem
Solving [Link](5)
Session - Jan
x = t2[t1[1]]
2026 ()
t3 = t1 + t2
t3 = (t1, t2)
t3 = (list(t1), list(t2))
8) Let d = {1 : “Pyhton”, 2 : [1, 2, 3]}. Which among the following will not give the error 2 points
after the execution?
d[2].append(4)
x = d[0]
d[“one”] = 1
[Link]({‘one’ : 2})
9) Which of the following data type is immutable? 1 point
list
set
tuple
dictionary
10) student = {‘name’: ‘Jane’, ‘age’: 25, ‘courses’: [‘Math’, 2 points
‘Statistics’]}
Which among the following will return
{‘name’: ‘Jane’, ‘age’: 26, ‘courses’: [‘Math’, ‘Statistics’], ‘phone’:
‘123-456’}
[Link]({‘age’ : 26})
[Link]({‘age’ : 26, ‘phone’: ‘123-456’})
student[‘phone’] = ‘123-456’
[Link]({‘age’ : 26})
None of the above
11) What is the output of the following code? 1 point
[Link] 3/4
1/25/26, 9:43 AM Python for Data Science - - Unit 5 - Week 2
[‘M’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]
[‘m’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’]
[‘M’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’]
[‘m’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]
12) What will be the output of the following code snippet? 2 points
[[1 2 3 4 5]
[3 4 5 6 7]
[5 6 7 8 9]]
[[1 2 3 4]
[3 4 5 6]
[5 6 7 8]]
[[2 3 4]
[4 5 6]
[6 7 8]]
None of the above
You may submit any number of times before the due date. The final submission will be considered
for grading.
Submit Answers
[Link] 4/4