Assigment - 2 - Week 2 - 2023 - G
Assigment - 2 - Week 2 - 2023 - G
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
If already registered,
click to check your
payment status
Week 2: Assignment 2
The due date for submitting this assignment has passed.
Due on 2023-08-09, 23:59 IST.
Course outline
Assignment submitted on 2023-08-09, 21:31 IST
How does an NPTEL 1) Which of the following object does not support indexing? 1 point
online course work?
() tuple
list
Week 0 ()
dictionary
Week 1 () set
Week 2 : Lecture
slides (unit?
unit=30&lesson=37)
Practice: Week 2:
Assignment 2 (Non
Graded) (assessment?
name=110)
[2, 3, 4, 5]
Quiz: Week 2:
[0 1 2 3]
Assignment 2
(assessment? [1, 2, 3, 4]
name=118) Will throw an error: Set objects are not iterable.
S 1
Data Science (unit? Score: 1
unit=30&lesson=114) Accepted Answers:
[1, 2, 3, 4]
Week 3 ()
4) What is the output of the following code? 1 point
Week 4 ()
Download Videos ()
Books ()
Text Transcripts ()
Problem Solving
Session - July 2023
()
5) Which of the following code gives output My friend’s house is in Chennai? 1 point
t1. append(5)
x = t2[t1[1]]
t3 = t1 + t2
t3 = (t1, t2)
t3 =( list(t1), list(t2))
t3 = t1 + t2
t3 = (t1, t2)
t3 =( list(t1), list(t2))
7) Let d = {1 : “P yhton”, 2 : [1, 2, 3]}. Which among the following will not give the error after the execution? 1 point
d[2] .append(4)
x = d[0]
d[ “one”]= 1
d. update({‘one’ : 2 })
d[ “one”]= 1
d. update({‘one’ : 2 })
list
set
tuple
dictionary
student.update({‘age’ : 26})
student.update({‘age’ : 26, ‘phone’: ‘123-456’})
student[‘phone’] = ‘123-456’
student.update({‘age’ : 26})
None of the above