0% found this document useful (0 votes)
3 views4 pages

Python For Data Science - Unit 5 - Week 2

This document outlines the details for Week 2 of the Python for Data Science course, including assignment questions and submission deadlines. It features a series of questions related to Python programming concepts such as data types, string manipulation, and code output. The assignment must be submitted by the specified due date, with multiple submissions allowed before final grading.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Python For Data Science - Unit 5 - Week 2

This document outlines the details for Week 2 of the Python for Data Science course, including assignment questions and submission deadlines. It features a series of questions related to Python programming concepts such as data types, string manipulation, and code output. The assignment must be submitted by the specified due date, with multiple submissions allowed before final grading.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

06/08/2025, 19:42 Python for Data Science - - Unit 5 - Week 2

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

[email protected]

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Python for Data Science (course)


Click to register
for Certification
exam
Week 2 : Assignment 2
(https://examform.nptel.ac.in/2025_10/exam_form/dashboard)
Your last recorded submission was on 2025-08-05, 15:59 Due date: 2025-08-06, 23:59 IST.
IST
If already
registered, click 1) Which of the following object does not support indexing? 1 point
to check your
payment status tuple
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
NPTEL “data” + “-” + “science”
online None of the above.
course
work? ()
3) What will be the output of the following code snippet? 2 points

Week 1 ()

Week 2 ()

Jupyter setup
(unit?
unit=30&lesso
n=31) [[ 5 12]
[21 32]]
Sequence_dat
a_part_1 [[19 22]
(unit? [43 50]]

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=30&assessment=168 1/4
06/08/2025, 19:42 Python for Data Science - - Unit 5 - Week 2

unit=30&lesso [[3 8]
n=32)
[35 56]]
Sequence_dat [[ 5 21]
a_part_2 [12 32]]
(unit?
unit=30&lesso 4) What will be the output of the following code snippet? 2 points
n=33)

Sequence_dat
a_part_3
(unit?
unit=30&lesso
n=34)

Sequence_dat
[ 1 10 3 4 5 6 7 8 9 10]
a_part_4
(unit? [ 10 1 2 3 4 5 6 7 8 9]
unit=30&lesso [ 0 10 2 3 4 5 6 7 8 9]
n=35)
[ 10 2 3 4 5 6 7 8 9 ]
Numpy (unit?
unit=30&lesso
5) What is the output of the following code? 2 points
n=36)

Week 2 :
Lecture slides
(unit?
unit=30&lesso
n=37)

Week 2 -
FAQs (unit?
unit=30&lesso
n=38) [2, 3, 4, 5]
[0, 1, 2, 3]
Week 2
Feedback [1, 2, 3, 4]
Form : Python
Will throw an error: Set objects are not iterable.
for Data
Science!!
(unit?
6) What will be the output of the following code snippet? 1 point
unit=30&lesso
n=114)

Quiz: Week 2
: Assignment
2
(assessment?
name=168) {27.5}
Practice: {1, 'four ', 3.0, 3, 5, 'two ', 10, 27.5}
Week 2:
{1, 'four ', 3.0, 5, 'two ', 10, 27.5}
Practice
Assignment 2 {1, 'four ', 3.0, 5, 'two ', 3}
(assessment?
name=167) 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?
Week 3 ()
t1.append(5)

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=30&assessment=168 2/4
06/08/2025, 19:42 Python for Data Science - - Unit 5 - Week 2

Problem x = t2[t1[1]]
Solving t3 = t1 + t2
Session - t3 = (t1, t2)
July 2025 ()
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
d.update({‘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’}

student.update({‘age’ : 26})
student.update({‘age’ : 26, ‘phone’: ‘123-456’})
student[‘phone’] = ‘123-456’
student.update({‘age’ : 26})
None of the above

11) What is the output of the following code? 1 point

[‘M’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]


[‘m’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’]
[‘M’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’]
[‘m’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=30&assessment=168 3/4
06/08/2025, 19:42 Python for Data Science - - Unit 5 - Week 2

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

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=30&assessment=168 4/4

You might also like